Alan Richardson and Thilan Samaraweera starred as Worcestershire gained the edge in their LV= County Championship Division Two match against Leicestershire at Grace Road.
Veteran seamer Richardson claimed the first hat-trick of his career and Sri Lankan batsman Samaraweera hit an unbeaten 99 as Worcestershire closed the second day nine runs behind their hosts.
With 38-year-old Richardson taking their last three wickets in three balls, Leicestershire added only four to their overnight score and were dismissed for 274.
Despite losing their first three wickets for 55, Worcestershire recovered to close the second day on 265 for five, with Samaraweera one run away from completing his second century against Leicestershire this season.
There was another excellent innings as well from 19-year-old Tom Fell, who earlier this month signed a two-year professional contract with Worcestershire. He departed for 84, just 11 runs short of posting his highest championship score.
Fell and Samaraweera shared a fourth-wicket stand of 181 in 56 overs and, at 236 for three, Worcestershire looked to have a stranglehold on the game.
However, Shiv Thakor, the seventh bowler used by Leicestershire, brought the game back to life with two wickets in as many overs.
Fell, having faced 167 balls and hit 14 fours, edged behind to wicketkeeper Niall O'Brien and Joe Leach was brilliantly caught at slip by Greg Smith when Thakor again found the edge. It meant the day started and ended with a flurry of wickets.
Richardson, who had already picked up two on the first day to take his total for the season past 50, struck with the last ball of his 24th over and then the first two of his next to bag the first hat-trick of his long and successful career.
The veteran had Ollie Freckingham caught at slip and then nailed both Matthew Hoggard and Alex Wyatt lbw to finish with figures of 5-57.
Three more wickets fell before lunch - all to lbw decisions. Openers Daryl Mitchell and Matthew Pardoe were Hoggard victims and Moeen Ali was trapped in front by Ben Raine.
Samaraweera and Fell dominated for the next three-and-a-half hours as the home attack toiled on a slow pitch.
Samaraweera reached his fifty off 98 balls and Fell reached the same landmark from 97 deliveries before Thakor's two late wickets gave Leicestershire hope.