London: Pakistan's Yasir Shah said varying his pace had been behind his spectacular return to Test cricket at Lord's on Friday.

The leg-spinner took five for 64 as England reached stumps on the second day of the first Test on 253 for seven — 86 runs behind Pakistan's first-innings 339.

It was the first time a leg-spinner had taken five wickets in a Test innings at the 'home of cricket' since Shah's fellow Pakistani Mushtaq Ahmed performed the feat 20 years ago.

Pakistan's Yashir Shah celebrates as he scalps his fifth wicket. AP

What made the 30-year-old Shah's feat all the more impressive was that this was his first Test outside of Asia and the United Arab Emirates.

It was also his first Test since completing a three-month drugs ban after he tested positive for the masking agent chlortalidone.

Shah told the International Cricket Council he had inadvertently taken his wife's blood pressure medication and his suspension was lifted in March, making him eligible for the England tour.

After he induced the well-set Joe Root to hole out on 48 and so end a second-wicket stand of 110, Shah ran through England's middle order, with James Vince, Gary Ballance, Jonny Bairstow and Moeen Ali also falling to the spinner.

Shah, who had previously posed England problems by taking a combined 15 wickets against them in two Tests in the UAE at an average of just over 21 apiece, said adjusting to local conditions had helped him on Friday.

'Clear role'

With Ahmed, now a member of Pakistan's coaching staff acting as an interpreter, Shah said: "I've played lots of cricket in the UAE where you have to bowl quicker. In England the pitches have got some pace so you have to concentrate on varying your pace.

"My role was very clear, to give support to the fast bowlers, but luckily I got the five wickets and I'm glad for the team."

As for Shah getting his name on the honours board Ahmed — who took five for 57 in Pakistan's 164-run win over England at Lord's in 1996 — added: "It's a great honour for Yasir to take five wickets here too, at the home of cricket.

"When you turn up all the bowlers and batsmen go to see other Pakistani names on the honours board. When you see your name on there you feel so proud.