Stoic rearguard batting from 10th wicket pair Paul Harrison and Jack Brooks saw Northamptonshire hold on for an unlikely draw against Derbyshire at the County Ground.
The Northants tail-enders batted out the final 79 balls to deny Chris Rogers' men a third victory of this season's Division Two campaign.
Northants began the final day still 243 runs behind but with their 10 second-innings wickets intact and openers Stephen Peters and Vishal Tripathi unbeaten.
But they were to lose Peters in the third over of the day for just 14 when he was trapped lbw by Derbyshire spinner Robin Peterson.
Tripathi and Alex Wakely, who was on a pair, then put on Northants' first 50 partnership of the match before Tripathi made his maiden County Championship half-century from 85 balls.
Indeed, it wasn't until all-rounder Greg Smith was handed the ball that Derbyshire's hopes of victory were reignited.
The off-spinner dismissed Tripathi for 71 and went on to remove Andrew Hall (27), James Middlebrook (4) and Dave Lucas (16) to put the visitors one wicket from victory.
However, wicketkeeper Harrison (32 not out) and number 11 Brooks (5no) dug deep to ensure Northants finished with four points to Derbyshire's 10.
Derbyshire declared with a 260-run lead on first innings over Northamptonshire on a rain-curtailed third day at Wantage Road.
Wayne Madsen, on 163 overnight, fell to Jack Brooks (1-83) for a career-best 179 and Paul Borrington reached a painstaking 79 not out as the visitors moved from 377-2 to 480-5 in the 26 overs possible before rain prompted an early lunch.
The skies briefly cleared an hour later but, just as the players were due to return to the field, the heavens opened again and they retreated to the dressing room.
Derbyshire declared their innings shortly before play did finally restart at 5.50pm.
Northants openers Stephen Peters (10no) and Vishal Tripathi (5no) were able to negotiate eight overs in gloomy conditions to reach the close on 17-0 in their second innings, a deficit of 243.
Derbyshire pair Chris Rogers and Wayne Madsen put on a new club record opening partnership against Northamptonshire, as the visitors took complete control on day two at Wantage Road.
Skipper Rogers returned to haunt his former county with an impressive knock of 141, while South African right-hander Madsen ended the day unbeaten on 163.
Rogers and Madsen passed the previous Derbyshire best against Northants, 216, set by Alan Hill and John Wright back in 1979.
Nicky Boje and James Middlebrook threatened a Northants revival with a wicket apiece in quick succession just before the tea interval, but Madsen and Paul Borrington (41 not out) easily saw Derbyshire through to a commanding position at the close.
The tone was set early in the day as Derbyshire resumed 163 runs behind Northants on 57-0, with Australian Rogers on 31 and Madsen on 17.
The opening pair were untroubled and Madsen went on to make his ton in 213 balls, including one six smashed straight down the ground off Nicky Boje.
Middlebrook was the man to finally break up the partnership in the 74th over, trapping Rogers lbw, but by then the damage was done and the visitors will be looking to set up an innings victory on Thursday.
Mark Footitt claimed four wickets on Tuesday to help Derbyshire dismiss Northamptonshire for 220 on the first day at Wantage Road.
The 24-year-old former England Under-19 international, who was tipped for senior duties as a youngster, was released by Nottinghamshire last year but returned figures of four for 78 off his 17 overs.
Footitt claimed the wickets of Stephen Peters (32), Rob White (0), Andrew Hall (33) after Tom Lungley had earlier dismissed Vishal Tripathi (13) and Alex Wakely (0), Northants having won the toss and chosen to bat.
Lungley also took the scalp of Paul Harrison (six), his haul of three wickets being matched by former South Africa international Robin Peterson, whose most notable victim was David Sales (33).
Northants captain Nicky Boje top-scored for the hosts with 54 before becoming Footitt's final victim, with Peterson then polishing off the tail.
In reply, the visitors' opening duo Wayne Madsen and Chris Rogers smashed 57 runs from 13 overs before the close of play to leave Derbyshire trailing by only 163 runs.