Sri Lanka extended their lead to 169 after spinner Ramesh Mendis took five wickets to help bowl out Pakistan for 231 on day three of the second Test on Tuesday.
The hosts had reached 22 at lunch in Galle for their second innings with openers wicketkeeper-batsman Niroshan Dickwella, on 11, and Oshada Fernando, on eight, at the crease.
The left-handed Dickwella opened Sri Lanka's batting with skipper Dimuth Karunaratne sitting out due to a lower back injury. The captain did not take the field in the Pakistan innings and will only bat if needed.
Pakistan's innings ended in the morning session after the tourists resumed the day on 191-7, in reply to Sri Lanka's first innings of 378.
Overnight batsman Yasir Shah resisted the bowling attack in a 32-run partnership with Hasan Ali, the pair batting for almost an hour before Prabath Jayasuriya broke through.
Jayasuriya, a left-arm spinner who took 21 wickets in his first two Tests, bowled Hasan for 21 at the stroke of the first drinks break. He returned with three wickets.
Off-spinner Ramesh sent back Nauman Ali and then trapped Yasir lbw for 26 to record a third five-wicket haul in his 10th Test to wrap up the innings.
Agha Salman remained Pakistan's top scorer with his fighting 62 on Monday.
Pakistan lead the two-match series 1-0.