Ed Joyce and Luke Wright led a Sussex fightback as the current LV= County Championship leaders battled to avoid defeat against third-placed Middlesex.
Forced to follow on by the side who will replace them at the top of Division One if they win, Sussex finished the third day on 228 for four, just 49 runs adrift, after skipper Joyce and all-rounder Wright added an unbroken 105 for the fifth wicket.
Wright, who reached 48 not out, had a big let-off on 40 when he was badly dropped by Tim Murtagh at deep square-leg off Ollie Rayner. He had faced 80 balls at stumps, while Joyce resisted for 129 deliveries in making 75.
Rayner took 5-63 as Sussex stumbled to 222 all out first time around and a home victory looked certain when James Harris then claimed the key wickets of Michael Yardy and Matt Prior in a brilliant spell either side of tea, leaving Joyce’s men 123 for four.
Joyce and Wright showed fighting spirit to resist thereafter, but Middlesex retained control and will hope to reignite their victory push with early wickets on the final day.
Sussex's second innings got off to a bad start with Luke Wells leg-before for nought to the sixth ball of the opening over, from Murtagh.
A second-wicket stand of 67 ended when Chris Nash, on 36, called Yardy through for an ambitious single to short third man and was beaten by Joe Denly's direct hit.
After battling to 41, Yardy was beaten for pace as he tried to hook a short ball from Harris and looped up a catch to Chris Rogers at square-leg.
The 23-year-old Middlesex paceman was again celebrating soon after when Prior aimed a pull at a ball that was not quite short enough for the stroke and mis-hit to mid on where Murtagh dived to his right to take the catch.
Earlier, Sussex resumed on 147 for seven in their first innings and, for most of the morning session, put up stout resistance through the eighth-wicket pair of Wright and Will Beer.
With Wright always looking to be positive and his partner mainly content to defend, the visitors added 88 in 40 overs before Beer was caught behind off Neil Dexter's medium-pace for a 141-ball 25.
From the very next delivery, at the start of the following over, Wright offered up a return catch to Rayner and Sussex were all out on the stroke of lunch when Steve Magoffin was lbw to the spinner for 10.
It was Rayner's first five-wicket haul since joining Middlesex from Sussex two years ago.