Leg-spinner Yasir Shah picked up nine wickets in the match to help Pakistan win the opening Test against Sri Lanka by 10 wickets on the final day.

The 29-year-old spinner, who had claimed two wickets in the first-innings, took a career-best 7-76 in the second before Pakistan chased down the 90-run victory target in a little over 11 overs to register their first Test win in Sri Lanka since 2006.

Openers Mohammad Hafeez (46) and Ahmed Shehzad (43) scored briskly to seal the victory in the three-match series even after rain had washed out four sessions of the contest on the first two days at the Galle International Stadium.

With their 123rd win, Pakistan have also become Asia's most successful Test team.

"It's a pretty bad loss, Pakistanis deserved to win," Sri Lanka captain Angelo Mathews said.

"We bowled well in patches but they bowled better than us. Our spinners were not that effective on this track."

While Shah was the wrecker-in-chief, paceman Wahab Riaz claimed 2-46.

Dimuth Karunaratne (79) was the highest scorer for the hosts who folded for 206. 

Sarfraz was named man of the match for his 86-ball 96 in the first-innings Ahmed [Getty Images]

After Sri Lanka resumed the final day on 63-2, Shah struck with the first ball of the day with nightwatchman Dilruwan Perera offering no shot to a ball that went to hit his off-stump.

Karunaratne and Lahiru Thirimanne (44) then added 69 runs for the fourth wicket to steady the ship before wheels came off Sri Lanka's innings.

Thirimanne, who hit Riaz for two boundaries in the same over, edged the bowler to slip where Younis Khan took the catch.

Mathews looked in discomfort against Riaz but was unlucky to be adjudged caught out at short-leg.

Mathews immediately sought a review, convinced he did not nick it and replay did not suggest any edge either but the original decision stayed, prompting the batsman to leave the field shaking his head.

Shah dismissed Kithuruwan Vithanage to complete his only second Test five-for and Sri Lanka soon came apart.

The teams move to Colombo for the second Test starting on Thursday.

Scorecard:

Sri Lanka 300 all out & 206 all out (Silva 125, Babar 3-64)

Pakistan 417 all out and 92-0 (Hafeez 46*, Prasad 0-10)

Source: Al Jazeera and agencies