Younis Khan was unbeaten on 30 at the break with opener Imran Farhat (29). The pair have so far put on 52 for the second wicket.
Sri Lanka needed a couple of early wickets to put pressure on Pakistan, but managed just one when makeshift opener Kamran Akmal was superbly caught by a diving wicket-keeper Kumar Sangakkara off seamer Lasith Malinga.
Akmal, opening the innings following the withdrawal of Shoaib Malik due to fever, contributed a brisk 26-ball 24 with the help of five fours.
Khan and Farhat then denied Sri Lanka further success with their sensible knocks. Khan was more aggressive than his partner, having so far struck five fours in his 47-ball knock.
Key off-spinner Muttiah Muralitharan also failed to keep pressure on the pair during his six-over spell.
Sri Lanka were earlier all out on their overnight total of 73, their second-lowest against Pakistan in 32 Test matches after 71 at the same venue in 1994.
Muralitharan was the last man out, caught by Umar Gul at mid-on off seamer Abdul Razzaq.
Left-handed opener Sanath Jayasuriya did not bat because of a thumb injury in his farewell Test.
Seamer Mohammad Asif finished the match with 11-71, the second-best figures by a Pakistani bowler against Sri Lanka following 14-116 by Imran Khan at Lahore in 1982.
Razzaq finished with four wickets.