London - Yasir Shah became the first leg-spinner in 20 years to take a five-wicket haul in a Test innings at Lord's to leave Pakistan well-placed at stumps on Friday's second day of their series opener with England.
At the close, England were 253 for seven in reply to Pakistan's first innings 339 - a deficit of 86 runs, with Chris Woakes 31 not out.
Shah, in his first Test since serving a three-month drugs ban - and his first outside of Asia and the United Arab Emirates - ran through England's middle-order on the way to five for 64 in 25 overs.
It was the first time any leg-spinner had taken five or more wickets in a Test innings at Lord's since his compatriot Mushtaq Ahmed's five for 57 in 1996.
Before the series started, Pakistan coach Mickey Arthur praised Shah's ability to both attack and contain at the same time.
Those traits were on show Friday and Shah, with Ahmed - now a member of Pakistan's coaching staff - acting as a translator - told Sky Sports that his job was to support the fast bowlers.
Woakes also had a day to remember, the Warwickshire pace-bowling all-rounder taking a Test-best six for 70.
"It's nice to get a regular run in the side," said Woakes who only got back into the side this season following an injury to fellow all-rounder Ben Stokes.
"Performing well is of course helping."
Earlier, England captain Alastair Cook made 81 and in the process surpassed India great Sunil Gavaskar as the highest run-scoring opening batsman in Test history.
But, in sight of a century, he became Mohammad Amir's first Test wicket in six years when the left-arm quick, who twice had Cook dropped, got him to play on.
Amir, was making his return to Test cricket at Lord's - the scene of his 2010 spot-fixing crime which saw him given a five-year ban and a jail term for deliberately bowling no balls.
Amir should have had Cook out for 22 when an excellent delivery took the outside edge only for first slip Mohammad Hafeez to drop the routine catch.
It was a similar story when left-hander Cook, now on 55, again edged Amir but wicket-keeper Sarfraz Ahmed floored the seemingly simple two-handed chance.
Amir screamed in frustration before sharing a wry smile with captain Misbah-ul-Haq, who gave the 24-year-old paceman a consoling pat on the back.
After the early loss of opener Alex Hales, Cook and new number three Joe Root shared a stand of 110.
Cook, belying his reputation as a steady run-maker, square-cut Rahat Ali to go to a 60-ball fifty with his 10th four.
But Shah turned the tide when he had Root carelessly hole out off a miscued sweep on 48.
James Vince and the recalled Gary Ballance were both lbw as they each failed to 'pick' Shah.
Cook's cut four off Amir took him to 61 and beyond Gavaskar's mark of 9,607 runs as a Test opener.
Amir eventually drew Cook wide and got the left-hander to play on to end a 124-ball innings featuring 12 fours.
Jonny Bairstow had rescued England from many a top-order slump in recent times.
But on Friday he was deceived into playing back to Shah and bowled by a top-spinner for 29.
That left England 193 for six and they were 232 for seven when, after a prolonged review, Yasir won a tight 'umpire's call' decision to have Moeen Ali lbw on the sweep for 23.
Even before Ali's exit had finally been confirmed, Shah had saluted his fifth wicket Friday by kissing the turf.
It was the fifth time in just 13 Tests that the 30-year-old Shah had taken five or more wickets in an innings.
Misbah only added four to his overnight 110 not out before he was bowled by Stuart Broad.
Amir, booed by a small section of a capacity crowd as he walked out to bat, inside edged his first ball in Test cricket in six years, from Broad, for four.
He was hit on the helmet next delivery when he ducked into another Broad ball before he was last man out, caught in the slips off England's spearhead.