Yasir Shah once again did the damage with the ball as Pakistan repelled a middle-order fightback from Jonny Bairstow and Chris Woakes to seal a 75-run victory in the thrilling first Test against England.
With Pakistan having set England a target of 283 for victory at Lord's, Rahat Ali (3-47) made early progress by taking the wickets of captain Alastair Cook (8), Alex Hales (16) and Joe Root (9) as England slipped to 47-3.
Pakistan's star of the match Yasir (4-69) then ended a promising knock from Gary Ballance (43) in the afternoon session as the tourists closed on victory.
But Bairstow (48) and England's man-of-the-moment Woakes (23) - who finished with 11 wickets in the match - put England in a position where victory appeared attainable with a valiant stand lasting more than 30 overs.
It was Yasir who proved the difference, though, ending Bairstow's brave resistance and completing his first 10-wicket Test haul by removing Woakes, whose patient 23 off 108 proved in vain.
10 - Yasir Shah has taken 10 wickets in a Test match for the first time. Special.-- OptaJim (@OptaJim) July 17, 2016
Pakistan consequently take a 1-0 lead in the four-match series, but perhaps just as important was the advert for Test cricket that both teams put on in an enthralling contest that could have gone either way.
The tourists, resuming on 214-8, added just one run to their overnight total as England quickly swept up the tail and they started with plenty of attacking intent - Cook smashing a straight-bat four through point off Mohammad Amir, and Hales typically aggressive.
But the morning session quickly unravelled as Cook feathered Rahat behind before Hales attempted an ugly swat that brought a sharp take from Mohammad Hafeez at first slip.
Younis Khan had two stabs at what would have been a stunning catch off James Vince (42), but Pakistan did have a third wicket when Root's woeful pull off Rahat was edged to a gleeful Yasir at deep square.
Vince and Ballance produced a counter-punch 49-run partnership either side of lunch, with the former going beyond his previous Test-best score of 35.
But Vince was undone by Wahab Riaz's (1-46) superb swinger that he edged to Younis at second slip and Ballance fell seven runs short of a half century when the sublime Yasir pitched one outside off that swung back past the batsman's pads.
Yasir struck again quickly to snare Moeen Ali (2) before tea, but England fought back valiantly through Bairstow and Woakes.
The scoring was slow in their stand, but Bairstow was patient and picked his shots well to put England into a position whereby, if the duo had reached the close, victory may have been within sight.
But Bairstow's three-hour stand ended in disappointment when he misjudged a Yasir short one that crashed the stumps.
Amir smashed Stuart Broad's (1) stumps before Steven Finn survived an lbw appeal off the next ball.
Yasir had one more moment of glory with a flighted ball that Woakes thick-edged to Younis at slip, and Amir rounded off the win by pulling up Jake Ball's (3) stump.
Pakistan then celebrated with a press-up salute in tribute to captain Misbah-ul-Haq's on-pitch workout on Thursday.