Pakistan declared their first innings with a lead of 410 runs on the fourth morning of the second Test in Colombo on Thursday.
Concussion substitute Mohammad Rizwan scored 50 off 67 balls, while Agha Salman made 132. Abdullah Shafique had earlier departed on 201.
Sri Lanka lost opener Nishan Madushka for 10 in their second innings, but were 81/1 at lunch, still trailing by 329 runs.
The match is evenly poised, with Pakistan having the advantage of a big first-innings lead, but Sri Lanka still have a chance to win if they can bat well in the second innings.