Sri Lankan pace-cum spin attack put the brakes on Pakistan's progress after they resumed at 51-0.
They removed both the openers in the first hour and then made inroads on a still batting friendly Dubai stadium pitch.
At the interval Azhar Ali was unbeaten on 28 and Haris Sohail was six not out as Pakistan still trail Sri Lanka first innings total of 482 by 367 runs.
They need another 177 more to avoid follow-on.
More From This Section
Sami Aslam was trapped leg before by off-spinner Dilruwan Perera for 39 to leave Pakistan two down for 65.
Asad Shafiq fell for 12 while Babar Azam made eight.
Sri Lanka lead the two-match series 1-0 on account of winning the first Test by 21 runs in Abu Dhabi.