Ned Eckersley inspired Leicestershire's fightback against Worcestershire in the LV= County Championship Division Two clash at Grace Road.
With Thilan Samaraweera hitting a season's best 144 not out, Worcestershire totalled 338 all out to claim a first-innings lead of 64.
And when Leicestershire plunged to 120 for six, the visitors looked in complete control with the chance of clinching victory inside three days.
But Eckersley followed up his first-innings 106 with an unbeaten 91 off 159 balls and shared an unbroken seventh wicket stand of 70 with James Sykes that gave Leicestershire a lead of 126 runs going into the final day as they closed on 190 for six.
Samaraweera, resuming on 99 not out, cut Matthew Hoggard's first ball for two runs to reach his century off 203 balls with 11 fours. It had been a chanceless innings and he remained immovable even as wickets fell at the other end.
Hoggard trapped Michael Johnson lbw and then bowled Shaaiq Choudhry for a duck before left-arm spinner Sykes chipped in with two wickets in successive deliveries. Jack Shantry was snapped up off a thin edge by wicketkeeper Niall O'Brien and Graeme Cessford had his stumps disturbed by a quicker delivery.
Ollie Freckingham brought the innings to a close by knocking back Alan Richardson's leg stump, leaving Samaraweera unbeaten on 144 off 262 balls with 17 boundaries.
Worcestershire's lead was 64 and Leicestershire were four wickets down before they reached parity; openers Greg Smith and O'Brien back in the pavilion with only 23 runs on the board.
Cessford, wicketless in the first innings, accounted for both of them. O'Brien top-edged a catch off a miscued pull and Smith was bowled by a ball that nipped back.
Leicestershire's problems mounted with Shiv Thakor lbw to Jack Shantry and Tom Wells bowled, shouldering arms to the same man.
Josh Cobb and the ever reliable Eckersley took Leicestershire into the lead with a stand of 34 before the former was caught at cover by Samaraweera off Cessford in the last over before tea.
Ben Raine looked in good touch, making 19 in a stand of 23 with Eckersley before being dismissed in bizarre fashion by Choudhry.
He played a routine defensive shot only for the ball to somehow spin back and roll into the stumps, dislodging the off bail to leave the hosts staring down the barrel.
But Eckersley remained unflappable, reaching his half-century off 106 balls with six fours, and support finally arrived in the form of Sykes for the final 23 overs of the day.