Off-spinner Jigar Naik claimed 5-36 to bowl Leicestershire to an 89-run win over Glamorgan.
Set a target of 338 at Grace Road, the visitors resumed on the final morning at 112-3 requiring a further 226 for victory.
The Welsh county lost Mike Powell (25), Huw Waters (9) and Mark Wallace (6) on the way to lunch at 199-6.
Ben Wright had stood firm with a defiant half-century but he was out for 65, one of four victims for Naik after lunch as Glamorgan were rolled for 248 in mid-afternoon.
Glamorgan will need 226 runs on the final day of their match against Leicestershire, with seven wickets remaining, if they are to make a winning start to the Division Two season.
Leicestershire set the Welsh visitors a victory target of 338 after Will Jefferson had steered them out of trouble with a magnificent century - and Glamorgan closed day three on 112-3.
At once stage Leicestershire were 43-5 in their second innings - but Jefferson (112) and Jigar Naik (67) shared a sixth-wicket partnership of 149 to lead the home side to a total of 245.
The last three Foxes wickets added another 35 runs before Dean Cosker had captain Matthew Hoggard leg before wicket, leaving Glamorgan a challenging target on a pitch starting to show some variable bounce.
Openers Gareth Rees and Alviro Petersen gave Glamorgan a solid start to the run-chase, until both were out in the space of four balls with the score on 43.
Captain Petersen was first to go, trapped lbw by a Nadeem Malik yorker, then Rees chopped the third delivery of the next over from Claude Henderson back into his stumps.
Will Bragg and Matthew Powell carefully set about rebuilding the innings and looked to have succeeded with a stand of 64 until, in the penultimate over of the day, Naik had Bragg lbw for 43.
Leicestershire captain Matthew Hoggard claimed a hat-trick as 16 wickets fell on the second day of their LV County Championship season opener against Glamorgan at Grace Road.
Hoggard dismissed Gareth Rees and William Bragg with the final two balls of his sixth over and then had Mike Powell caught by Will Jefferson, to complete his treble and leave the Welsh side on 38-3.
Glamorgan captain Alviro Petersen waged a lone battle with 91 but he was last out in his side's total of 146, which represented a first-innings deficit of 92.
Hoggard, who has now taken three career hat-tricks including one for England on the 2004 tour of West Indies, finished with 3-28 and spinner Claude Henderson 3-32.
Leicestershire's batsmen did not exactly cover themselves in glory at the start of their second innings, slumping to 43-5 before Will Jefferson (48no) and Jigar Naik (14no) saw them through to the close at 78-5, an overall advantage of 170.
Claude Henderson's 74 not out rescued Leicestershire after they had slipped to 156-8 after opting to bat first against Glamorgan at Grace Road.
The veteran South African, batting at number eight, hit 10 fours during his 146-ball effort as the Foxes' tail wagged to leave them 231-9 at stumps.
Glamorgan new boy Graham Wagg (2-78) had struck twice with the new ball and spinner Dean Cosker ran through the middle order to claim 4-41, including James Taylor for 45.
But they could not find a way to dislodge Henderson, who advanced to his 16th first-class half-century and found a willing ally in skipper Matthew Hoggard (12no).
Leicestershire's last-wicket pair put on an unbroken 39 to hold the Welsh county at bay throughout the final hour of the opening day of the season.