Left-arm spinner Rangana Herath claimed six wickets as Sri Lanka fashioned an unlikely seven-wicket victory over Pakistan to go one-up in the two-test series overnight.
Herath took six for 48 as Pakistan crumbled to 180 all out in their second innings, leaving Sri Lanka to chase 99 for victory in 21 overs in a contest that looked to be heading for a draw at the start of the final day.
Sri Lanka got there with 4.4 overs to spare with skipper Angelo Mathews, who hit an unbeaten 25, stroking the winning runs to spark off celebrations around the ground.
Herath cleaned up the Pakistan tail, leaving Sarfraz Ahmed unbeaten on 52, his second half-century of the match. Dilruwan Perera chipped in with 2-68, following up his five-wicket haul in the first innings.
''This is not a kind of pitch that is bowler friendly, but I realised that on the fifth day there was something in it for the spinners... we had a lot of faith,'' Herath said.
''When there is support from another spinner it's easy to bowl and take wickets. In that aspect Dilruwan supported me very well that's why I was able to take so many wickets.''
Pakistan captain Misbah-ul-Haq said Sarfraz's half-centuries were one ''positive'' he could take from a defeat he put down to folding ''under pressure''.
''I think credit should be given to Herath, he knew these conditions very well, especially Galle, he's been so successful here and he varied his length and pace well,'' Misbah said.
''I think on the last day the match situation also gets you under pressure and you make mistakes.''
The second test starts in Colombo on Thursday and will be the final appearance of former Sri Lankan captain Mahela Jayawardene in the longer form of the game.
Should bouncers be banned from cricket?