|Third Test, Pallekele (day five):|
|Sri Lanka 278 & 313|
|Pakistan 215 & 382-3|
|Pakistan win by seven wickets|
Pakistan completed their highest ever run chase in Test cricket and the sixth-highest of all time to secure a 2-1 series win over Sri Lanka.
The tourists finished on 382-3 in Pallekele to claim a seven-wicket win in the final and decisive Test.
Chasing 377, Pakistan were 13-2 before Younis Khan and Shan Masood put on 242 for the third wicket.
Masood was out for 125 but Khan was 171 not out as Pakistan reached the target to move to third in the Test rankings.
The total, sealed when captain Misbah-ul-Haq (59 not out) hit Jehan Mubarak for six, was also the highest run chase made in Sri Lanka and the second highest made in Asia.
Pakistan had gone into the final day needing 147 more runs for a memorable win and off-spinner Tharindu Kaushal drew Masood out of his crease to have him stumped.
But that was the only wicket Sri Lanka managed as they suffered a first home series defeat by Pakistan since 2006.
Sri Lanka drop four ranking points, but remain seventh on the International Cricket Council's list.