Gloucestershire recovered from 46-5 to enjoy the better of day two in their Division Two fixture with Leicestershire at Grace Road.
Benny Howell, Will Gidman and Jack Taylor all hit half-centuries as Gloucestershire's last five wickets added 234 runs to guide the visitors to a total of 280 and a first-innings lead of 30.
Gidman followed that up by dismissing both Leicestershire openers. Michael Thornely bagged a pair, popping up an easy catch to mid-on off the first ball of the innings, and Niall O'Brien was lbw for seven as Leicestershire closed an eventful second day on 32-2, to lead by two runs.
Gloucestershire, starting the day still 219 runs behind on 31-2, endured a nightmare first half-hour, losing three wickets for 15 runs in six overs.
Michael Klinger and Alex Gidman were both caught behind flicking at deliveries down the leg side, and nightwatchman David Payne was bowled off stump during an impressive spell from Ollie Freckingham.
Hamish Marshall and Howell steadied things with a resolute partnership of 61, although Howell survived a chance to Robbie Williams at mid-on when he mistimed a lofted drive off Jigar Naik.
He celebrated that escape with a straight six off the same bowler but Marshall, three runs away from a half-century, was trapped lbw by Freckingham soon after lunch.
Will Gidman joined Howell in another fine stand of 67, reverse sweeping left-arm spinner Claude Henderson to the boundary to reach his fifty off 51 balls with eight fours, before falling lbw to Naik.
The much more cautious Howell reached his half-century off 152 balls hitting two sixes and one four. But, when he was also out lbw to Henderson for 52, Taylor went onto the attack.
He reached his fifty off 52 balls and finished unbeaten on 61, having shared a last-wicket partnership of 51 with Craig Miles, who contributed a valuable 23.
Freckingham had a career-best return of 4-69 and Williams also claimed four wickets. But it was very much Gloucestershire's day.