Leicestershire 415 (Ali 80, Robson 61, Raine 51, Norwell 4-97) and 155 for 9 dec (Redfern 74) drew with Gloucestershire 269 for 8 dec (Dent 73, Handscomb 53) and 212 for 5 (Tavare 52, Dent 52)
Declarations by both sides set up a potentially exciting finish, but bad light forced an early close with Gloucestershire, chasing 302 to win, still 90 runs short with five wickets and just under nine overs of their match against Leicestershire at Grace Road remaining.
Resuming on the final day with their first innings on 249 for 8, Gloucestershire captain Will Tavare called his batsmen in as soon as the follow-on had been saved, with the visitors still 146 runs adrift of Leicestershire's first innings score.
With the Leicestershire batsmen looking to score quickly, Tavare's bowlers then took four wickets before lunch. Liam Norwell had Ned Eckersley caught off a top edge, a fine effort from David Payne running back from midwicket, and Angus Robson caught behind with a delivery that bounced and left him.
Mark Cosgrove hit a swift 21 before trying to hit Benny Howell over midwicket and being given leg before, and Aadil Ali, looking to drive, gave Kieran Noema-Barnett a straightforward return catch.
Wickets continued to tumble after lunch, with Niall O'Brien, Wayne White, Ben Raine and Clint McKay all falling cheaply, but Dan Redfern hit his highest score of an injury-hit season, allowing Cosgrove to declare in turn.
Tavare and Chris Dent gave Gloucestershire the ideal start, compiling an opening partnership of 108 at over four an over, but left-arm seamer Rob Taylor picked up Dent caught and bowled off a leading edge.
Tavare gloved an attempted hook at Ben Raine behind the wicket to Niall O'Brien behind the stumps, but Peter Handscomb and Neema-Barnett had added 40 for the sixth wicket to reignite the chase when the light became unplayable.