Northants 289 and 174 for 3 (Procter 68) need a further 140 to beat Derbyshire 260 and 342 (Madsen 116, Critchley 51, Prasanna 4-104)
Northamptonshire skipper Alex Wakely revived his team's chances of pulling off a record-breaking run chase after another Wayne Madsen century set up the prospect of a thrilling finish to the Division Two match against Derbyshire at Chesterfield.
Madsen made 116 and allrounder Matt Critchley 51 as Derbyshire posted 342 to set Northants 314, which would be the highest fourth innings total at Queen's Park. Dan Wheeldon dismissed England batsman Ben Duckett to claim his maiden first-class wicket but 68 from Luke Proctor and an unbeaten 48 from Wakely took the visitors to 174 for 3, 140 short of their target.
The first session was always likely to be pivotal and Derbyshire were the team who went into lunch in a position of strength thanks to Madsen and Harvey Hosein. Both played patiently to deny Northants early wickets and although the bowlers maintained discipline on another stiflingly hot morning, there were few alarms for the batsmen.
By the time Hosein was bowled sweeping at Seekkuge Prasanna for 38, Derbyshire's lead was 180 and Critchley helped Madsen add another 40 to that by lunch. Madsen completed his 27th first-class hundred for Derbyshire from 170 balls and although he fell to a smart slip catch soon after, he had given his side the initiative.
Critchley acknowledged his fourth Championship fifty of the season before he was unluckily run out but Hardus Viljoen hit Prassana for two big sixes to take Derbyshire's lead past 300.
Northants knew they would have to bat exceptionally well on a pitch taking increasing turn and the odds against them appeared to lengthen when they lost Duckett and Ricardo Vasconcelos in the first 14 overs.
Duckett was hit on the back leg by a good ball from Wheeldon and when Vasconcelos edged offspinner Hamidullah Qadri to slip, the target looked a long way off. But Proctor and Wakely showed good judgement and Northants's hopes were starting to climb when Critchley got one to pop to have Proctor caught at leg slip.
Another wicket would have made Derbyshire favourites but Wakely and Richard Levi batted through the last 10 overs to tilt the match towards Northants although the outcome remains in the balance.