Gloucestershire are closing in on a first LV= County Championship Division Two win of the season after bowling Leicestershire out for 217 on day three at Grace Road.
That meant the visitors need 188 to triumph and they reached 17-0 at the close from seven overs, with Chris Dent and Michael Klinger both eight not out.
Leicestershire began the day on 32-2 and were only able to add another 185 runs in 87 overs, falling short of the sizeable target they would have hoped to set their visitors.
Will Gidman (4-39) got the first breakthrough when he had night watchman Ollie Freckingham (7) lbw in his second over of the morning.
Top-scorer Nathan Eckersley (45) then fell when a swinging delivery from Benny Howell (3-39) clipped his off stump, but Ramnaresh Sarwan (44) and Josh Cobb (43) then added 76 for the fifth wicket.
However, Leicestershire's revival came to an abrupt end when three wickets fell for 12 runs in just seven overs, a slump which began when Cobb was caught low down at mid-wicket off Howell.
Skipper Sarwan was then bowled off an inside edge in Howell's next over and Shiv Thakor (2) was bowled round his legs by Jack Taylor.
Matt Boyce (35) and Jigar Naik (21) then shared a stand of 50 for the eight wicket to take Leicestershire past the 200 mark.
But the second new ball brought a quick end to the innings as Gidman and Craig Miles (2-64) put the finishing touches to an impressively disciplined Gloucestershire bowling performance.
However, with the pitch slow-paced, Leicestershire will still be hoping to make life hard for their visitors on the final day.