Dinesh Chandimal led by example with his first century as Sri Lanka Test captain but Pakistan made a positive start to their reply on day two in Abu Dhabi.
The imperturbable Chandimal was unbeaten on 155 - his second-highest Test score - and Niroshan Dickwella made a more entertaining Test-best 83 to get the tourists up to 419 all out.
A patient Chandimal, who faced 372 balls in what was his ninth Test hundred, and the aggressive Dickwella put on 134 for the fifth wicket as Sri Lanka set about trying to silence their critics.
Mohammad Abbas (3-75) and Yasir Shah (3-120) took three wickets apiece before Shan Masood and Sami Aslam saw Pakistan through to 64-0 at stumps.
An unflappable Chandimal was watchful on day one and took the same approach in the morning session after the tourists resumed on 227-4 on Friday, but Dickwella needed only four balls to move from 42 to a sixth Test half-century.
The pair continued to frustrate Pakistan as the partnership passed 100, Dickwella comfortably outscoring his captain and overtaking him following a reverse-sweep to the boundary off Yasir.
Dickwella missed out on a maiden Test ton when the left-hander played on to a delivery from Hasan Ali, but Chandimal was rewarded for his defiance by bringing up a 273-ball hundred with a glorious cover drive off Mohammad Amir.
Dilruwan Perera successfully reviewed after being given out leg before when he got an inside edge on an arm ball from Yasir and it took Dilruwan 33 deliveries to finally get off the mark after also overturning an lbw decision.
After Sri Lanka took lunch on 322-5, Dilruwan got his eye in, using his feet superbly to get to the pitch of the ball and loft Hasan for six over long-on, but a 92-run partnership was ended when debutant Haris Sohail snared him lbw for 33.
Chandimal had started to adopt a more attacking approach, hitting Yasir for back-to-back boundaries, and passed 150 before tea, but Abbas cleaned up the tail as the last five wickets fell for only 32 runs.
Masood and Aslam saw Pakistan through to the close unscathed, reducing the deficit to 355 runs on what was very much Chandimal's day.