Yasir Shah
Yasir Shah took the final wicket to break England's valiant effort Getty Images

Pakistan claimed a dramatic last-gasp victory over England as Yasir Shah broke Adil Rashid's resistance with 39 balls remaining to win the second Test by 178 runs in Dubai. Rashid (61) soaked up 173 deliveries before driving to Zulfiqar Babar at cover to delight the hosts, who go 1-0 up in the three-match series with one game remaining.

England had been staring a heavy defeat in the face after losing Joe Root (71), Jonny Bairstow (22) and Jos Buttler (7) in the morning session to leave Pakistan four wickets from victory, but a stunning resistance from the lower order almost yielded a second draw in a row. After Ben Stokes was dismissed for 13, Stuart Broad (30), Mark Wood (29) and Rashid guided England into the final hour of the match with a draw still feasible.

But after Wood found Mohammad Hafeez at gully, Rashid finally succumbed to a floaty delivery from Shah, which the Yorkshire all-rounder smashed straight to Babar at cover, as England were bowled out for 312. Victory guarantees that Pakistan will retain their unbeaten Test series record in the United Arab Emirates heading into the third and final game in Sharjah.

Though Alastair Cook's side produced a fine and character-building display on the final day, they will look to the loss of seven wickets for 70 runs on day three as the reason for the harrowing defeat – which is accentuated by falling 25 runs short of winning the first Test in Abu Dhabi. The third and final Test starts on Sunday 1 November.

"That morning on day three has really cost us. In these conditions you can't afford those two or three hours," Cook said. "But the character we showed today, they are a fantastic bunch of guys who refused to buckle. The innings Adil played, he'll take a lot from that. It was disappointing he couldn't get over the line but if we'd all faced six or ten balls more we would have done it."