Shoaib Malik and Abdul Razzaq put on a stand of 82 runs to guide Pakistan to a six-wicket victory over Sri Lanka on the final day of the second Test on Monday.
The win levelled the two-match series 1-1 and prevented Sri Lanka from completing a hat-trick of victories in Pakistan after their successes in 1995/96 and 1999/2000.
Chasing 137 for victory after Sri Lanka had made 406 in their second innings, Pakistan were struggling on 57 for four until Malik, with an unbeaten 53, and Razzaq, not out on 35, steadied things.
Chaminda Vaas and Rangana Herath took two wickets each as Imran Farhat (19), Yasir Hameed (15), Yousuf Youhana (one) and Younis Khan (14) fell in the space of 26 runs to give Sri Lanka an outside chance of victory.
The match was dominated by Pakistan leg spinner Danish Kaneria with match figures of 10 for 190. The 23-year-old took seven for 118 in the Sri Lankan second innings which ended in the second over after lunch with Vaas unbeaten on 32.
BRIEF SCORES
Sri Lanka:
208 and 406 all out (K Sangakkara 138, S Jayasuriya 107, C Vaas 32 n.o., M Jayawardene 32; D Kaneria 7/118, Naved-ul Hasan 3/83) lost to Pakistan: 478 and 139 for 4 (S Malik 53 n.o.; C Vaas 2/45, R Herath 2/63)