Jayawardene was unbeaten on 136 -- his 25th Test hundred -- while Samaraweera notched 130 not out for his eighth hundred after the tourists won the toss and decided to bat.
The 31-year-old Sri Lankan skipper, whose lack of form in recent one-day matches forced him to step down from the captaincy after the two-Test series against Pakistan, also completed 8,000 career Test runs during the innings.
Samaraweera matched his skipper shot for shot and the pair added 229 for the unfinished fourth-wicket stand, blunting Pakistan's three-pronged pace attack on an unresponsive pitch.
Jayawardene has so far knocked 20 boundaries during his 239-ball innings. The Sri Lankan skipper hit leg-spinner Danish Kaneria for his 15th boundary to reach his century -- his first against Pakistan.
He now has a hundred against all nine Test playing nations.
When on 37, Jayawardene hit debutant paceman Sohail Khan for a boundary to complete 8,000 runs in his 101st Test. He is the first Sri Lankan and