Mathews notched up 116 not out under pressure for his second Test hundred and put on invaluable 138-run partnership for the fifth wicket with Dinesh Chandimal (89) and 99 for the unfinished sixth wicket with Prasanna Jayawardene (48 not out) to take Sri Lanka to 420-5 at close at Sheikh Zayed Stadium.
Sri Lanka resumed the day at 186-4, but Mathews' career-best score and resolute innings by Chandimal and Prasanna helped Sri Lanka add 234 runs for the loss of only one wicket.
Mathews batted with resolve, blunting off-spinner Saeed Ajmal and had the better of Pakistan's three-pronged pace attack, reaching his hundred in the final session, taking two off Bhatti. His hundred came off 239 balls.
In all the Sri Lankan captain batted for 370 minutes, hitting 12 boundaries and six off Ajmal, who conceded 96 runs in 42 wicket-less overs.
Neither Mathews nor Chandimal were bothered at all and even the second new ball, taken at 249-4, failed to benefit Pakistan with a wicket as Sri Lanka reached 285-4 at lunch.