Paceman Huw Waters took 4-39 as Glamorgan claimed a 78-run win over Middlesex, their first victory at Lord's for 56 years.
Middlesex were bowled out for 296 in pursuit of a target of 375 despite Dawid Malan's 115.
Malan, resuming on 94, advanced to his second first-class century but was caught behind off Jamie Dalrymple's off-spin shortly afterwards, one of five Middlesex wickets to go down before lunch.
From an overnight position of 187-4, the home side crumbled to 294-9 as Waters ripped through the middle order.
Glamorgan sealed victory when last man Steve Finn was Waters' fourth victim in the third over of the afternoon session.
Middlesex have now suffered successive losses to start the season, while Glamorgan bounced back in style from their heavy defeat at home to Sussex in the opening round.
Middlesex have dented Glamorgan's bid for victory on day three of their match at Lord's.
England Test captain and Middlesex opener Andrew Strauss led the hosts' fightback after seeing his side being reduced to one for two before he even faced a delivery.
The visitors had compiled 219 all out in their second innings, with their total seeing them build up a 374-run lead.
The Panthers, inspired by Strauss' 69 and fellow left-hander Dawid Malan's unbeaten 94, re-grouped to reach 187-4 by stumps - though they still require a further 188 to complete an improbable win.
Glamorgan paceman David Harrison bagged his first five-wicket haul for four years to leave Middlesex struggling to avoid their second successive defeat.
On a day which saw 17 wickets fall, the 28-year-old extracted movement through the air and off the pitch to take five for 62 and help dismiss the hosts inside 52 overs for just 160, as they responded to Glamorgan's 315 all out.
They were Harrison's best four-day figures since his five for 76 against Worcestershire at New Road in May 2006.
Bowling in tandem with medium-pacer Jim Allenby, who swung the ball prodigiously under early-morning cloud cover to claim four for 29, Harrison proved nigh on unplayable for a Middlesex top order low on confidence and match practice.
Glamorgan captain Jamie Dalrymple decided against enforcing the follow-on, opting instead to bat again and give opening bowler James Harris time to receive treatment for a leg injury that restricted his input to only seven overs.
But Glamorgan also found batting difficult second time around, as they limped to 119 for six to extend their lead in the match to 274 going into day three.
Glamorgan, however, will still fancy their chances of wrapping up their first championship win at Lord' s since 1954.
Wicketkeeper Mark Wallace hit 73 not out as Glamorgan made a good start to their match against Middlesex as they reached 309-9 at stumps at Lord's.
The Welsh side's day started badly when Australian opener Mark Cosgrove was bowled by new England man Steve Finn for a five-ball duck.
Gareth Rees (38) and Mike Powell (55) added 84 for the second wicket to steady the ship, but they both went in the space of six overs.
South African Gareth Berg then got rid of both Ben Wright and Jamie Dalrymple quickly, before Jim Allenby added 111 alongside Wallace before being trapped lbw for 57.
Berg grabbed a third wicket but Wallace ended the day unbeaten on 73 and will look to get as many quick runs as he can alongside number 11 Huw Waters.