Sri Lanka batted out for a draw against Pakistan in the third and final Test at the Pallekele Stadium on Thursday to win their first series in nine attempts since August 2009.
Dinesh Chandimal (65) and Kumar Sangakkara (74 not out) shared an 88-run second wicket partnership as Sri Lanka finished on 195-4 having been set a 270-run victory target earlier in the day by Pakistan, seeking a draw to level the three-match series.
It was Sri Lanka's first series victory for almost three years when they beat New Zealand. Since then they have drawn three series and lost five.
The defeat was Pakistan's first since England beat them 3-1 in August 2010 and captain Misbah-ul-Haq's first series loss since his appointment two months later.
Earlier, Asad Shafiq (100 not out) hit his second Test hundred before Pakistan declared their second innings at 380 for eight wickets.
The visitors batted for 100 minutes on the fifth and final day, allowing Shafiq to get his century before their attempt to salvage something from the series.
Sri Lanka won the first Test in Galle by 209 runs while the second Test in Colombo was drawn.
Match even after bowlers dominate
Pakistan drop Misbah, recall Kamran for World T20
Azhar Ali frustrates Sri Lanka with another ton
Dara Singh's Most Memorable Fight
Pakistan hit back after double-century stand