Sri Lanka won their first Test series in three years after the final Test with Pakistan ended in a draw on Thursday.
Sri Lanka made a late surge in Pallekele to chase down the target of 270 by tea on the fifth day, but abandoned their second innings with nine overs left after off-spinner Saeed Ajmal snared two quick wickets.
It meant the players shook hands with Sri Lanka at 4-195, leaving Kumar Sangakkara on 74 not out and Angelo Matthews unbeaten on one, as the home fans left disappointed despite the series win.
Sri Lanka had needed an improbable 138 runs from a minimum of 33.4 overs with eight wickets in hand.
Late replacement for Tillakaratne Dilshan, who missed the match for family reasons, Dinesh Chandimal, anchored the innings with a superb 65.
The 22-year-old looks a prodigious talent having posted a third half-century in four Tests with a series of versatile strokes on both sides of the wicket.
Sri Lanka won the series 1-0 following a 209-run victory in the first Test in Galle and the drawn second Test due to rain in Colombo.
Pakistan had declared early on day five at 380-8 with Asad Shafiq unbeaten on 100 just half an hour before lunch.
The tourists added 81 runs in 24.4 overs in the morning session.
Spinner Rangana Herath was Sri Lanka's best bowler with 4-99 while quick Dilhara Fernando claimed 3-74.
Sri Lankan opener Tharanga Paranavitana and Chandimal started with intent, piling on 44 runs in the first ten overs.
That sparked hope of a rapid chase before Paranavitana made way for 22 when he was caught at slip by Younis Khan off Junaid Khan.
Chandimal was dismissed by Ajmal in the last over before tea, snapping short his promising 88-run stand with Sangakkara.
That seemed to put the brakes on Sri Lanka's chase, who then lost captain Mahela Jayawardene for just 11 off 44 balls when he scooped a catch off Ajmal for Mohammad Hafeez at short leg.
Ajmal picked up his third wicket and effectively ended the match as a contest when he bowled Thilan Samaraweera for 10 with Sri Lanka still 92 runs off the target with 15.5 overs left.
Sangakkara continued his successful series with an unbeaten knock to add to his 199 not out in the first Test and 192 in the second.
The series win was Sri Lanka's first since defeating New Zealand 2-0 at home in 2009.