Abdullah Shafique struck 160 not out in a fourth innings masterclass to help Pakistan pull off a stunning chase and register a four-wicket victory against Sri Lanka in the opening test in Galle on Wednesday.
The tourists began an intriguing final day needing 120 runs with seven wickets in hand to go 1-0 ahead in the two-test series.
Pakistan went on to accomplish their second highest successful chase of 342 riding Shafique's career-best knock, which included seven fours and a six.
"As a youngster, he showed his class and temperament," Pakistan captain Babar Azam said of Shafique whose 480-ball vigil earned him the man-of-the-match award.
Pakistan also jumped ahead of Sri Lanka in the World Test Championship standings with only South Africa (71.43%) and Australia (70%) above them.
In-form Prabath Jayasuriya was Sri Lanka's best bet on a worn-out pitch and the left-arm spinner, who claimed 5-82 in the first innings, began the proceedings for the hosts on the final day.
He nearly struck with the first delivery of the day which breached Mohammad Rizwan's (40) defence but somehow missed the stumps.
The spinner, who claimed 12 wickets in his test debut against Australia at the same venue earlier this month, repeatedly beat the bat but had to wait for success.
Sri Lanka wasted both remaining reviews challenging not-out decisions against Shafique and Rizwan off Jayasuriya's bowling.
Jayasuriya (4-135) finally broke the 71-run stand dismissing Rizwan lbw with a ball that kept low and went straight.
Agha Salman and Hasan Ali fell cheaply but Sri Lanka's faint hopes of an unlikely victory evaporated when Kasun Rajitha dropped Shafique at deep square leg.
Pakistan were 11 runs away when rain intervened and Shafique sealed Pakistan's victory with a boundary when play resumed.
The indefatigable Jayasuriya bowled 56.2 overs in the second innings and finished with a match-haul of nine wickets.
"As a bowling unit, we need to give more support to Prabath," Sri Lanka captain Dimuth Karunaratne said after the loss.
"He did a really good job... he bowled in the good areas and didn't give any loose balls."
The teams stay put in Galle for the second test beginning on Sunday.