Australian seamer Michael Hogan took 5-43 and passed 50 Championship wickets as Glamorgan bowled out Leicestershire for 203 at Swansea.
However, in reply Glamorgan stumbled to 36-3 by the close in - a deficit of 167.
Leicestershire openers Greg Smith and Niall O'Brien looked relatively untroubled as they reached 67 without loss in the 18th over before Glamorgan fought back to have the visitors 100-3 at the start of the 27th.
Smith found himself trapped leg before wicket to Hogan before O'Brien edged slow left-armer Dean Cosker to backward point six balls later.
And as Leicestershire brought up three figures there was a notable moment for 20-year-old off-spinner Andrew Salter, who struck with his first ball in Championship cricket to have Shiv Thakor caught behind by captain Mark Wallace.
Leicestershire reached lunch at 113-3, but in the afternoon session they slumped to 156-7 as Hogan reached 50 wickets for the season during a burst of 3-4 in 14 balls.
The beginning of Leicestershire's collapse saw Ned Eckersley go leg before shouldering arms to Hogan, who struck again two balls as Tom Wells also departed lbw to a full-length ball.
Hogan's productive spell from the Mumbles Road end saw the end of Josh Cobb, who edged to Jim Allenby at first slip.
Glamorgan's dominance in the session was complete when Graham Wagg bowled captain Matthew Boyce.
Nine balls after tea Hogan completed his third five-wicket haul in four-day cricket this season as Ollie Freckingham went leg before.
Salter's encouraging debut continued as he bowled Ben Raine for 37 to leave the Foxes 199-9 and make it maximum bowling points.
The last pair registered a batting point before Cosker claimed the final wicket of James Sykes in the 81st over.
In reply Glamorgan lost both openers, Gareth Rees and Will Bragg, in the space of three overs. Rees was caught behind off Freckingham while Alex Wyatt had Bragg leg before. Ben Wright then edged Freckingham to second slip as the hosts slumped to 24-3.