Wainwright, Hughes spare Derbyshire
Derbyshire 279 for 8 (Wainwright 83*, Hughes 60), Raine 3-34) trail Leicestershire 311 (O'Brien 89, Footitt 6-65, Palladino 4-62) by 32 runs
A career-best 60 from Alex Hughes and David Wainwright's highest score for Derbyshire spared the county the ignominious prospect of a second-day follow-on at Grace Road.
The visitors had slipped to 115 for 6, still needing a further 47 to avoid being asked to bat again by Leicestershire, with the match only midway through its fifth session in Division Two.
However, Hughes dropped anchor alongside Wainwright to guide his side past their initial target, sharing a stand of 91, and on to a respectable 279 for 8 in response to their hosts' 311.
The 22-year-old was eventually undone by the second new ball, clipping Alex Wyatt to Ben Raine at midwicket but Wainwright was still there at stumps on 83 - although the chances of him surpassing his career-best of 104 he made for Yorkshire in 2008 may depend heavily on how Derbyshire's tailenders perform early on the third day.
Derbyshire had resumed the day 12 without loss but in the second over of a morning offering significant movement to the bowlers, Paul Borrington edged Anthony Ireland to second slip.
Stephen Moore was pinned leg before to a Raine delivery which kept low before bad weather forced an early lunch.
Within minutes of the restart Wayne Madsen's innings of 27 was ended by a rising Raine delivery which was taken by Ned Eckersley at slip before wicketkeeper Niall O'Brien held on to edges by Scott Elstone, chasing a wide delivery from Wyatt, and Marcus North.
When Wyatt nipped one back to clip the top of Gareth Cross' off stump for a duck Derbyshire were teetering and had it not been for Hughes and Wainwright Division Two's bottom side would have crumbled.
The pair reached tea at 157 without further loss, which saw Hughes surpass his previous best of 36 in nine previous matches, and four leg byes off the 22-year-old took Derbyshire past the follow-on target and brought up the 50 partnership.
Wyatt made the breakthrough with the second new ball and Tony Palladino chipped Raine to midwicket but Wainwright found another willing ally in Tom Taylor (20 not out) and will need all his assistance as he closes in on a century on Tuesday.