Sri Lanka recorded an exciting seven-wicket win over Pakistan in Galle to move 1-0 ahead in the two-Test series.
Pakistan began the final day 78 runs adrift at 4-1 and were all out for 180, spinner Rangana Herath taking 6-48.
Sri Lanka needed 99 to win in 21 overs and Mahela Jayawardene, who will retire from Tests after this series, opened in his final Test innings at Galle.
Jayawardene made 26 and Angelo Mathews was unbeaten on 25 from 13 balls as Sri Lanka won with four overs to spare.
As well as the run rate, the Sri Lankans had to contend with a fast approaching storm, and shortly after they clinched victory, a torrential downpour began.
At the start of the final 15 overs, 75 were required and Jayawardene was the second wicket to fall, bowled by a Junaid Khan yorker in the 12th over of the innings, to silence a 5,000-strong crowd who had been hoping he would see the hosts to victory.
Kumar Sangakkara, who made his 10th Test double century on Saturday, departed in the 15th over, top-edging to mid-off for 21, but skipper Mathews hit two sixes in an unbroken partnership of 26 in barely two overs with Kithuruwan Vithanage to win it before the rain came.
The second and final Test begins at the Sinhalese Sports Club in Colombo on Thursday.