Opener Dimuth Karunaratne compiled a brilliant century to put Sri Lanka in a commanding position at 254 for three on the opening day of the second day-night Test in Dubai on Friday.
The left-hander was unbeaten on 133, adding 118 for an unbroken fourth-wicket stand with skipper Dinesh Chandimal (49 not out) after Sri Lanka won the toss and batted on a flat Dubai Stadium pitch.
Karunaratne batted with authority and style to reach his seventh Test hundred off 197 balls, hitting Mohammad Amir for two consecutive boundaries to complete three figures.
He batted for 381 minutes, hitting 15 boundaries and a six.
Karunaratne fell seven runs short of a hundred in the first Test in Abu Dhabi where Sri Lanka won by 21 runs to take a 1-0 lead in the two-match series.
Chandimal followed his 155 not out in the opening Test with another confident innings, collecting five boundaries as the Sri Lankan pair blunted Pakistan's bowling attack.
"It's satisfying to score a hundred," said Karunaratne, who needs just 10 more to reach 3,000 Test runs. "I missed that chance in Abu Dhabi. It was tough to bat early on, but once I had my eyes set in I batted with confidence.
"It was nice to have a good partnership with Chandimal and that has given us a good score which we need to build on tomorrow."
Pakistan took the second new ball after 82 overs but failed to claim any further wickets, with Amir walking off the field in the middle of his 17th over with an apparent injury.
Pakistan, who have never lost a Test series in the United Arab Emirates, also wasted both their reviews off the second new ball to cap a woeful day for them.
Leg-spinner Yasir Shah was the pick of bowlers with 2-90 while Amir returned figures of 1-59.
Karunaratne and opening partner Kaushal Silva (27) provided a solid platform for Sri Lanka with a 63-run stand before Pakistan hit back with three wickets in quick succession.
Shah delivered the much-needed breakthrough for his team when he had Silva caught behind off a short delivery.
Debutant Sadeera Samarawickrama impressed during his quick-fire 38, smacking five boundaries and a six before he miscued a pull and was caught and bowled by Amir.
Kusal Mendis played a rash drive off Shah and was caught in the slips for one.
Karunaratne crunched three boundaries in an Amir over and then hit Shah for another to reach his sixth Test fifty.
Sri Lanka made two changes from the first Test, leaving out Lahiru Thirimanne and Lakshan Sandakan for Samarawickrama and paceman Lahiru Gamage while Pakistan brought in fast bowler Wahab Riaz in place of the unfit Hasan Ali.
This is the sixth day-night Test with a pink ball since Australia and New Zealand played the first such contest at Adelaide in December 2015.