Dhananjaya de Silva and Kamindu Mendis steadied Sri Lanka after early setbacks as the visitors reached 114-3 at stumps on the second day of the first Test against Pakistan in Rawalpindi on Tuesday.
Mendis was unbeaten on 40 and De Silva on 22, with the pair adding an unbroken 49-run partnership to prevent further damage before bad light forced an early close.
Sri Lanka resumed the final session at 42-2, with opener Lahiru Udara on 29 and Mendis on eight.
Udara continued his attacking approach but fell to Pakistan debutant Saqib Khan for 42 off 52 balls, leaving the visitors at 65-3.
Former captain De Silva then joined Mendis and the two resisted Pakistan’s bowling attack to guide Sri Lanka safely to the close.
The visitors still trail Pakistan by 320 runs after the hosts declared their first innings at 434-9.
Pakistan’s fast bowlers had made an immediate impact after the declaration, reducing Sri Lanka to 42-2 by tea.
Mohammad Abbas struck in the third over, dismissing Pasindu Sooriyabandara for a seven-ball duck, before Saqib removed Dinesh Chandimal for one in the following over.
Udara and Mendis then combined to prevent further losses before the interval.
Earlier, Pakistan had resumed the day on 281-5 and extended their total through a valuable sixth-wicket partnership between overnight batter Saud Shakeel and wicketkeeper Ghazi Ghori.
The pair added 96 runs before Dilshan Madushanka dismissed Ghori for 48 off 72 deliveries, including two boundaries, to leave Pakistan at 377-6.
Shakeel continued to anchor the innings alongside debutant Arafat Minhas, taking Pakistan beyond 390 before lunch.
Resuming after the interval on 390-6, Shakeel was dismissed by Asitha Fernando for 93 off 199 balls, an innings containing nine fours.
Minhas, however, continued his impressive debut by reaching a half-century. The left-hander scored 52 off 67 deliveries, hitting nine fours and a six, before Madushanka ended his innings.
Razaullah fell for 10 soon afterwards, prompting Pakistan to declare at 434-9.
Fernando and Madushanka finished with three wickets each for Sri Lanka, while Lahiru Kumara, Milan Rathnayake and Sonal Dinusha took one apiece.
Pakistan will look to press home their advantage on the third day, while Sri Lanka need their middle order to build on the resistance shown by Mendis and De Silva.

