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 its series opener with England. At the close, England was 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. 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 wicketkeeper Sarfraz Ahmed floored the seemingly simple two-handed chance. Amir screamed in frustration before sharing a wry smile with captain Misbahul 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, struck three fours in four balls as Rahat Ali strayed onto the left-hander's pads. 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 it was 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. Earlier, Woakes took a Test-best six for 70 as Pakistan, 282 for six overnight, was bowled out for 339. 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 and was hit on the helmet next delivery when he ducked into another Broad ball. He was last man out for 12, caught in the slips off Broad. Scoreboard Pakistan (1st innings) M, Hafeez c Bairstow b Woakes 40 S, Masood c Bairstow b Woakes 07 A, Ali lbw b Ball 07 Younus c Ali b Broad 33 Misbah b Broad 114 A. Shafiq c Bairstow b Woakes 73 R. Ali b Woakes 00 S. Ahmed c Vince b Woakes 25 W. Riaz b Woakes 00 M. Amir c Root b Broad 12 Y. Shah not out 11 Extras (b4, lb10, w2, nb1) 17 Total (all out, 99.2 overs) 339 Falls: 1-38 (Masood), 2-51 (Hafeez), 3-77 (Azhar), 4-134 (Younis), 5-282 (Shafiq), 6-282 (Rahat), 7-310 (Sarfraz), 8-310 (Riaz), 9-316 (Misbah), 10-339 (Amir). Bowling: Broad 27.2-9-71-3 (1w); Ball 19-5-51-1 (1w); Woakes 24-7-70-6; Finn 21-2-86-0; Ali 7-0-46-0 (1nb); Vince 1-0-1-0. England (1st innings) A. Cook b Amir 81 A. Hales c A. Ali b Rahat Ali 06 J. Root c Hafeez b Yasir Shah 48 J. Vince lbw b Y. Shah 16 G. Ballance lbw b Y. Shah 6 J. Bairstow b Y. Shah 29 M. Ali lbw b Y. Shah 23 C. Woakes not out 31 S. Broad not out 11 Extras (nb2) 2 Total (7 wkts, 71 overs) 253 To bat: S Finn, J Ball. Falls: 1-8 (Hales), 2-118 (Root), 3-139 (Vince), 4-147 (Ballance), 5-173 (Cook), 6-193 (Bairstow), 7-232 (Ali). Bowling: Amir 18-2-65-1; Rahat Ali 14-1-68-1; Riaz 14-0-56-0 (2nb); Shah 25-5-64-5.