Experienced batsmen Younis Khan and Misbah-ul Haq hit sparkling hundreds as Pakistan took command of the first Test in Abu Dhabi on Wednesday.
Younis hit 136 for his 23rd hundred while Misbah was 105 not out for his fifth as Pakistan reached 327-4 at the close on the second day in reply to Sri Lanka's first innings total of 204.
Asad Shafiq was the other not out batsman with 12 as Pakistan dominated the day after Sri Lanka took two early wickets in the first session.
Pakistan now lead by a healthy 123 runs, primarily because of Younis and Misbah sharing 218 runs for the fourth wicket.
Younis hit spinner Rangana Herath for his 13th boundary to complete his hundred, taking just 47 balls for his second 50 runs. He also hit a six.
Younis equalled Javed Miandad's record of 23 centuries, the third highest for Pakistan in the list topped by Inzamam-ul Haq (25) and Mohammad Yousuf (24).
Younis was finally bowled by paceman Shaminda Eranga after his 198-ball knock which included 19 fours and a six.
Younis was happy with his performance.
"I tried to motivate Misbah and he tried to do the same to me, saying that we must stay at the wicket and that's how our partnership developed and gave the team a good position," said Younis, who has now scored 1,659 runs in 22 matches against Sri Lanka -- the most in Tests for Pakistan.
Former captain Inzamam-ul Haq scored 1559 in 20 Tests.
Younis is hoping Pakistan can build on the lead on Thursday.
"If we bat for another one hour tomorrow and add as many runs as possible, it will be good because Sri Lanka has some good players and I remember the last time we played them here (in 2011), Kumar Sangakkara got double hundred in the second innings (to draw the match)."
Misbah had luck on his side as he was dropped by Mahela Jayawardene when on 69, as he tried to paddle sweep Herath and the fielder, moving to leg-slip, failed to hold an easy chance.
Misbah had also survived a close leg-before appeal on 48 off a luckless Herath as Sri Lanka's referral was wasted as TV umpire Ravi Sundaram adjudged the ball had hit the bat.
The Pakistani skipper reached his hundred with a single off spinner Sachitra Senanayake, taking 297 minutes for the century which included 12 boundaries.
He has so far hit 13 boundaries in his chancy innings and once again proved to be the mainstay for Pakistan.
Sri Lanka had taken the second new ball with Pakistan 251-3 but they only bagged one wicket in the last two sessions.
Eranga was the best bowler with 2-63.
Sri Lanka had started the day by dismissing Mohammad Hafeez (11) and Ahmed Shehzad (38) after Pakistan resumed at 46-1.
Hafeez had started well, hitting two straight boundaries off Lakmal before miscuing a drive off the same bowler and was smartly caught at short cover by Kaushal Silva.
Silva, also a wicketkeeper but selected as opener in this Test, dived to his left and caught the ball inches from the ground.
Shehzad also miscued a hook shot and was caught at forward square-leg by Dimuth Karunaratne after hitting three boundaries.
But after those two wickets, Misbah and Younis led Pakistan's recovery.
The second Test will be played in Dubai (January 8-12) and the third in Sharjah (January 16-20).