A sixth-wicket partnership of 188 in 49 overs between Chris Rogers and John Simpson saw Middlesex hold Northamptonshire to a draw at Lord's.
Middlesex remain only seven points behind the Steelbacks, the LV=County Championship second division leaders, whilst holding a game in hand.
It looked as though Middlesex were on their way to only their second defeat of the LV= County Championship season when they slumped to 78-5, but they batted all day to finish on 313-8.
Rogers, who had two seasons with Northamptonshire, made 145 before he was leg before to the occasional leg-spin of Rob White.
Wicketkeeper-batsman Simpson, meanwhile, had scored 72 when he was bowled playing across the line against Luke Evans.
Middlesex had started the final day 24 runs behind at 58-4 and they had added only 20 when Jamie Dalrymple, who had helped Rogers add 47 for the fifth wicket, was bowled by Chaminda Vaas for 23.
Chaminda Vaas and Andrew Hall ripped through Middlesex's top order to leave Northamptonshire in a strong position heading into the final day at Lord's.
Vaas (2-26) and Hall (2-11) each struck twice as Middlesex, faced with a first-innings deficit of 82, slumped to 58-4 in their second innings at stumps on day three of the top-of-the table LV County Championship Division Two clash.
It could have been even worse had Chris Rogers (27no) and Jamie Dalrymple (15no) not seen them through the final nine overs of the day with an unbroken 27-run stand for the fifth wicket, having come together at 31-4.
Earlier, Northants produced a solid effort all the way down the order to advance their first innings from an overnight 188-2 to 399 all out.
Mal Loye, on 80 at the start of the day, missed out on a century when he edged behind off Tim Murtagh (1-99) for 87.
But Niall O'Brien chipped in with 50 and five other batsmen reached at least 20 to ensure a useful first-innings advantage.
Middlesex seamer Stephen Crook, playing against his former county, picked up 5-94.
Chaminda Vaas took 5-76 as second division leaders Northamptonshire took the upper hand against Middlesex at Lord's.
The hosts were bowled out for 317 early in the afternoon before the visitors consolidated their position by reaching 158 before the loss of their first wicket.
Mal Loye and Stephen Peters rode their luck against the new ball attack to lead their side to 188-2 at the close, Loye still at the crease on 80 not out.
Peters, who had been dropped on 38, was caught and bowled by Steven Crook for 75 before the same bowler claimed the wicket of Rob White, who gloved a catch to Dawid Malan at slip.
Middlesex had resumed on 198-6 and added a further 119, thanks mainly to John Simpson, who batted for almost three and a half hours for his 61.
He had good support from Toby Roland-Jones (24), the pair adding 51 for the seventh wicket, and Tim Murtagh (27), with their ninth-wicket association worth 46.
Simpson was the last to go, giving Vaas his second five wicket haul at Lord's.
Scott Newman and Chris Rogers both hit half-centuries as Middlesex reached 198-6 on a rain-hit first day of their clash with Northamptonshire at Lord's.
The pair put on 101 for the second wicket as Middlesex made a strong start after being put in to bat but the Division Two leaders would hit back, with three wickets from Chaminda Vaas helping to check the hosts' progress.
Rain delayed the start until after lunch and held up play again in the afternoon but Newman (75) and Rogers (67) made light of the conditions, the former securing his highest County Championship score of 2011.
Newman was eventually run out by an Alex Wakeley direct hit and Vaas (3-46) then followed up the breakthrough with a telling spell of his own.
The Sri Lankan trapped Dawid Malan (one) lbw before having Neil Dexter (10) and Jamie Dalrymple (nought) caught behind, while skipper Andrew Hall claimed the last wicket of the day as Rogers chopped onto his stumps.