Sri Lanka managed to weather the storm from Pakistan's bowlers to close day one of the third Test on 220-5.
Pakistan's Saeed Ajmal came into form in the evening session after Sri Lanka reached lunch on 133-3.
Ajmal took a key wicket in the form of Mahela Jayawardene, who managed to score 47 runs from 108 balls, but Ajmal wasn't finished as he later dismissed Dinesh Chandimal for 11 following a catch by Asad Shafiq.
Despite a positive spell from the field, Angelo Mathews (24 not out) and Prasana Jayawardene (28 not out) managed to withstand the bowlers' pressure to reach stumps.