Mahela Jayawardene struck his 32nd Test century as Sri Lanka took firm control of the second Test against Pakistan in Dubai.
The 36-year-old had not struck a ton in five-day cricket since the defeat to England at Colombo in April 2012 and had been moved down to five in the batting order, but he bounced back to form with an unbeaten 106 as the tourists reached 318 for four, a lead of 153, at the close.
But there was some disappointment for Sri Lanka on day two as Kaushal Silva fell agonisingly short of a maiden century when he was dismissed for 95 in the evening session.
Pakistan had made breakthroughs early in the day, with Kumar Sangakkara and Dinesh Chandimal respectively trapped lbw by Rahat Ali and caught at long leg off Junaid Khan.
But Silva, resuming on 12 from an overnight total of 57 for one, was watchful in the morning as he advanced to 40 not out in a lunch score of 132 for three, with Jayawardene at the crease alongside him.
The pair continued their solid form after lunch, gathering 83 runs without loss in the afternoon session as Sri Lanka took tea on 215 for three, already 50 ahead of Pakistan's 165 all out.
Both batsmen reached their half-centuries with little alarm, taking their side into the lead in the process, but a hundred for Silva proved one step too far.
Having resumed in the evening on 92, the 27-year-old could add only three more runs before he was trapped lbw by Mohammad Hafeez.
But it proved Pakistan's only scalp of the session, as Jayawardene went on to reach his ton while Angelo Mathews came in to add 42 not out.