Kaushal Silva fell in the final over of the day after his 81 had given Sri Lanka a lead against Pakistan on day three of the first Test in Abu Dhabi.
Silva had taken Sri Lanka to an advantage of just seven runs when he fell to Junaid Khan as the tourists ultimately closed on 186 for four.
Angelo Mathews’ side had earlier bowled Pakistan out for 383, the designated hosts adding just 56 runs for the loss of six wickets.
Misbah-ul-Haq top-scored in the session as he added 30 to his overnight 105 but, despite the collapse, Pakistan still boasted a lead of 179.
Rangana Herath and Shaminda Eranga ended with three wickets apiece, while Suranga Lakmal claimed two and Mathews one.
Sri Lanka returned to the middle for one over before lunch was called, navigating their way through that for two runs.
But when they lost Dimuth Karunaratne for 24, bowled by Junaid, the total had reached 47.
Kumar Sangakkara hit 55 before edging behind off Bilawal Bhatti, who also got the prized scalp of Mahela Jayawardene for a duck.
Silva responded impressively yet ultimately ended disappointed as Junaid induced a feather behind.