Derbyshire 167 (Lloyd 54, Scriven 3-30) and (Madsen 59*, Thomson 46*, Currie 3-36) trail Leicestershire 574 for 7 dec by 183 runs
Wayne Madsen was again a thorn in Leicestershire's side as he rescued Derbyshire from the threat of a three-day defeat in the Vitality County Championship match at Derby.
After Derbyshire were made to follow-on 407 runs in arrears, the 40-year-old blocked the visitors' push for victory with an obdurate unbeaten 59 from 114 balls to steer his team to 224 for 6 at the close.
But with rain forecast on the final day, Madsen, who has scored five centuries against Leicestershire, has given his side a good chance of salvaging a draw.
Despite missing several frontline bowlers, Leicestershire bowled Derbyshire out for 167 with Tom Scriven, Ben Mike and Scott Currie all taking three wickets. When Derbyshire slipped to 144 for 6 in their second innings, Leicestershire sensed an early finish but Alex Thomson, 46 not out, stayed with Madsen for 27 overs to keep them waiting.
Derbyshire's chances of avoiding the follow on had been slim at the start of another sunny but chilly day and drifted even further 10 overs into the morning session. Nightwatchman Sam Conners was the first to go when he played across the line at Scriven but the departure of David Lloyd was a damaging blow to the hosts.
The Derbyshire captain looked in good touch, pulling Mike for six before driving the seamer to the cover boundary to reach 50 from 63 balls. But Mike had the last word when he deceived Lloyd with a ball that angled away to knock out his off stump.
Aneurin Donald and Anuj Dal restored some order with a stand of 67 from 74 balls until the introduction of Liam Trevaskis lured Donald into a rush of blood. He swept the left arm spinner's first ball to the boundary but then charged down the pitch, missed an ugly swipe and was bowled. It was a reckless shot in any circumstances but was wholly inappropriate given the state of the match.
The lower order subsided quickly with Currie claiming the last two wickets which left Derbyshire to face one over before lunch. Harry Came survived a hard chance to short leg off the penultimate ball but the openers looked relatively comfortable after the interval, passing 50 before Currie hit a hot streak. Running in from the Racecourse End, he trapped Came on the crease and in his next over removed Reece who misjudged the line, offering no shot to a ball that nipped back.
But the best was still to come. Lloyd was completely deceived by a full toss that dipped on him, knocking out the off stump and leaving him flat on his back. When Trevaskis again struck in his first over, pinning Brooke Guest leg before half-forward just before tea, the scent of victory was in the air for the visitors.
On a day of little comfort for Derbyshire, Wayne Madsen passed 15,000 first-class runs after the interval but lost Donald who aimed a pull at Scrivens and was bowled.
Dal stayed with Madsen for seven overs before Mike had him caught behind down the legside but Thomson joined Madsen to frustrate Leicestershire.