Jim Allenby hit an unbeaten 138 as Glamorgan dominated the second day of their LV= County Championship Division Two clash with Leicestershire at Grace Road.
Following the visitors' declaration on 442-9, the Glamorgan attack skittled Leicestershire for just 142, with Michael Hogan and John Glover taking four wickets apiece.
That left the home side 300 runs behind and facing the prospect of being asked to follow on when day three commences.
Allenby, having been dropped on 20, began the day needing 11 runs to reach his half-century. Three boundaries off Nathan Buck (3-83) quickly took him to that target and from that point on Glamorgan piled on the runs in fluent style.
Graham Wagg (58) ensured the fourth batting point with a reverse sweep to the boundary off Jigar Naik in the 110th over and went on to reach his half century off 83 balls with seven fours.
Allenby's century off 160 balls - including a six and nine fours - came in the same over with the seventh wicket pair sharing a stand of 117.
But at the fall of the ninth wicket Glamorgan declared, leaving Allenby on 138 not out off 204 balls and his former side Leicestershire needing 293 to avoid the follow on.
Glamorgan's bowlers then took over, ripping through Leicestershire's top order with the first five wickets falling for 47 runs in 16 overs, with Hogan (4-25) firmly to the fore.
It was a hapless batting effort from the hosts, whose top-scorer was Josh Cobb with 29, as Glover returned figures of 4-51 to provide able back up to Hogan.