Sussex 429 and 71 for 7 lead Derbyshire 337 by 163 runs
Robin Peterson revived a game that appeared to be drifting towards a draw when he demolished the Sussex batting to put Derbyshire in with a chance of victory at the County Ground.
The South African left-arm spinner found turn and bounce to take 4 for 10 in 11 overs as the visitors lost five wickets in 10 overs to collapse to 71 for 7 in their second innings.
That put them only 163 ahead going into the final day and Derbyshire, who had trailed by 92 runs after Luke Wright claimed a career-best 5 for 65, will fancy their chances if the rain which is forecast stays away.
The prospect of Derbyshire taking control of the match seemed unlikely at the start of the third day when they were still 36 runs short of saving the follow-on, and they had a couple of scares before they reached the 280 target.
Tom Poynton was dropped by wicketkeeper Ben Brown off Wright with the score on 258 and Steffan Jones was missed on nought with the home side seven short. Wright bowled Poynton for 14 off his pads but Jones and Peterson had taken Derbyshire to within one run of a third batting point when James Anyon had Peterson caught at second slip for 31.
Jones again showed he is a handy batsman and swept Monty Panesar for six before rain held up the game for more than two hours after lunch. When play resumed, Jones and Tom Lungley cut Sussex's lead to under 100 before Wright had Lungley lbw and Mark Footitt caught behind in the space of four balls, with Derbyshire all out for 337.
Footitt had been wayward in the first innings but he bowled a testing opening spell in the absence of Lungley who was off the field with a back problem. Michael Yardy drove and clipped Jones for two fours in the first over but was then lbw to a full-length ball from Footitt and Chris Nash was fortunate when he edged the fast bowler between the wicketkeeper and first slip.
Peterson gave a glimpse of the problems that lay ahead for Sussex when one delivery to Ed Joyce took off and the Irishman became his first victim when he top-edged a sweep and was well caught for 20 by substitute Jon Clare running from slip.
Murray Goodwin was caught behind for six when Greg Smith found some movement with his medium pace which began a startling decline with Peterson snaring three wickets for one run in 15 balls.
It was lift that accounted for both Nash and Wright who edged to slip before a quicker ball pinned Michael Thornely lbw as he played back. Smith switched to off spin from the Pavilion End and struck in the final over of a dramatic last session when Anyon was lbw padding up to leave the match fascinatingly poised.
Sussex vs Derbyshire
County Championship Division Two
England Domestic Season