Younis Khan struck an unbeaten 171 to help Pakistan on their way to a strong first-innings total of 347-5 at lunch on day two of the first Test with Sri Lanka.
The 29-year-old was first up to the crease as Pakistan resumed at 261-4, and he was untroubled to build on his 133 from day one.
Khan has so far hit 15 boundaries and a six en route to recording his 24th Test century, while Asad Shafiq racked up 75 in Galle until he was bowled lbw by Rangana Herath.
Sri Lanka almost ended Khan's eight-hour stint at the crease when he was on 156, but Shaminda Eranga spilled a sharp return catch.
Pakistan's Sarfraz Ahmed was unbeaten at 28 heading into the break, adding 54 runs of his own to his side's tally.