Sri Lanka closed day four of the third Test in Sharjah on 133-5, a second-innings lead of 220 runs over Pakistan.
Mahela Jayawardene top-scored with a patient 46 after two wickets from Abdur Rehman had threatened to restrict their progress.
In the morning session Pakistan captain Misbah-ul-Haq's 63 kept his side in touch as they added 50 for the last four wickets before being bowled out for 341, Rangana Herath taking 5-125.
They then had Sri Lanka, who lead the three-match series 1-0, one down before the first interval.
Dimuth Karunaratne edged the second ball of Sri Lanka's second innings through the slips for four, but reached only eight before being bowled by Mohammad Talha via a bottom-edged pull.
Kumar Sangakkara also fell for eight, this time Rehman having him caught at deep mid-wicket by Khurram Manzoor off a top edge.
Rehman struck again to remove Kaushal Silva, bowling him between bat and pad for 36, to leave Sri Lanka three down at tea.
Dinesh Chandimal saw his stumps sent sprawling by Talha for 13, while Mahela Jayawardene's stay at the crease ended when he sent an inside edge to Azhar Ali at short leg off Saeed Ajmal.
Angelo Mathews (14) and Prasanna Jayawardene (six) were unbeaten at the close.
Earlier, Misbah resumed on 36, having lost partners Asad Shafiq and Sarfraz Ahmed late on Saturday evening, and advanced to an 86-ball half-century as his side moved beyond 300.
There was little support from the other end, though, with Rehman and Talha making only two apiece before both falling to Shaminda Eranga (4-60).
Misbah put on 25 for the ninth wicket with the scoreless Ajmal, including two sixes off Herath. The first of those came from a slog-sweep but he holed out to Chandimal trying to repeat the stroke.
Last man Junaid Khan slog-swept his first ball for six and cleared the ropes again later in the over but, on 16, he also picked out Chandimal to give Herath his fifth wicket.
Unusually, the nearly 14 overs of the morning occupied by Pakistan contained three sixes but no fours, and indeed the innings' last five boundaries were all maximums from Misbah and Junaid.