Pakistan's final four wickets could only add 50 to their overnight score as Sri Lanka went to lunch on day four of the third Test in Sharjah leading by 106 runs.
Captain Misbah-ul-Haq was Pakistan's last recognised batsman and he resumed at the crease with his side on 291-6, but wickets were falling quickly at the other end.
Shaminda Eranga dismissed both Abdur Rehman and Mohammad Talha for two as Pakistan fell to 300-8, which is when Misbah went on the attack and moved past his half-century.
He eventually went for 63 after being caught by Dinesh Chandimal off the bowling of Rangana Herath and, although number 11 Junaid Khan struck two sixes in adding all 16 runs in a final-wicket stand that was ended when he was sent back to the pavilion by the same combination, a total of 341 left them 87 behind.
Talha picked up the early scalp of Dimuth Karunaratne (eight) as Sri Lanka reached the interval at 19-1, with Kaushal Silva and Kumar Sangakkara poised to extend their lead into a winning one after lunch.