Misbah hit an unbeaten 68 in 72 balls while Azhar Ali made a superb century as Pakistan successfully chased 302 in two sessions to win the match and draw the series 1-1.

It ensured Whatmore’s tenure ended on a high, with the series in the United Arab Emirates marking his farewell after his contract was not renewed.

“This is my best moment as captain,” Misbah said. “We really wanted to win, especially for Dav. We wanted to win it for him and level the series. We really enjoyed being with him for these two years. We love you and we wish you all success.”

Sarfraz Ahmed’s promotion to No 5 was a sign of Pakistan’s determination to pursue the testing target, and the wicketkeeper hit 48 from 46 balls before Azhar — who was dismissed late on — and Misbah secured victory.

ConfidentMisbah said the intent was to go for a win. “Even with this 300 target, we knew we could go for it and get the win.

There was no pressure, clear message was there when our innings started, we sat together and in the meeting we clearly decided we are going for it at any cost, whether it turned into 2-0 no problem, but we will try to do it 1-1,” said Misbah.

Dav Whatmore

Sri Lanka skipper Angelo Mathews blamed the result on their collapse from 133 for five overnight to 214, the last five wickets falling for 25 runs.

Mathews said: “They were desperate to win because they were 1-0 down so we held on. We did that well for the first three and a half days, but our batting failed. “I can’t blame the spinners, it was more our batters’ fault.”

The chase was Pakistan’s second-highest in Tests and, with a run rate of 5.25, the second-quickest chase of over 200. Both records date from 1994, when they made 315 for nine to beat Australia in Karachi while England scored 205 for two in 35.3 overs, or 5.77 per over, to beat South Africa at the Oval.