Azhar Ali was unbeaten on 74 while Babar Azam fell in the last over of the day for 28 as Pakistan were still 153 behind with six wickets intact.
Openers Shan Masood (59) and Sami Aslam (51) had put 114 for the first wicket while Asad Shafiq made 39.
Earlier Openers Shan Masood and Sami Aslam scored half centuries before Sri Lanka’s spinners hit back to put Pakistan under pressure on the third day of the first Test in Abu Dhabi on Saturday.
Pakistan were 121-2 at lunch after both openers were removed, with Azhar Ali unbeaten on five and Asad Shafiq on one with Pakistan still 298 runs behind Sri Lanka´s first innings total of 419.
Masood struck a confident 59 while Aslam made 51 in a solid stand of 114 before the Sri Lankan spinners Dilruwan Perera and Rangana Herath put the brakes on the innings.
Aslam, recalled after being dropped from the West Indies tour on disciplinary grounds earlier this year, was trapped leg-before by off-break bowler Perera. He hit four boundaries in his seventh Test half century.
Two runs later Masood attempted a sweep shot off the wily Herath but missed the ball and was bowled round his legs.
Both Azhar and Shafiq survived confident appeals. Azhar wisely reviewed a leg-before decision off Perera, but the ball hit his bat before the pad.
Shafiq was given not out on a review when he was stumped off Herath on one.
Pakistan, replying to Sri Lanka’s first innings total of 419, had reached 64-0 at close on the second day of the match on Friday.
Earlier, Sri Lankan skipper Dinesh Chandimal scored a brilliant 155 not out while Niroshan Dickwella made a career best 83, to post a big 419 against Pakistan on the second day.
Chandimal remained unbeaten over 546 minutes with 14 boundaries, which left Pakistan’s bowlers frustrated on a flat pitch.
Diruwan Perera added 33 to the Sri Lankan scoreboard.
Fast bowler Mohammad Abbas (3-75) and leg-spinner Yasir Shah (3-120) sported the best figures for Pakistan.