Pakistan rode on centuries by Younus Khan and captain Misbah-ul-Haq to finish the second day of the first Test on a healthy 327-4 and 123-run lead against Sri Lanka.
Khan hit 19 fours and a six in scoring an unblemished 136 off 198 balls before he was bowled off an inside edge.
Misbah ground out an unbeaten 105 off 250 balls with 13 fours and will resume the third day with Asad Shafiq unbeaten on 12.
Sri Lanka first innings 204
Pakistan first innings
K Manzoor run out 21
A Shehzad c Karunaratne b Eranga 38
M Hafeez c Silva b Lakmal 11
Y Khan b Eranga 136
M Haq not out 105
A Shafiq not out 12
Extras: (1b, 1w, 2nb) 4
TOTAL: (4 wickets, 109 overs) 327
Fall of wickets: 1-46, 2-59, 3-83, 4-301
Misbah's and Khan's 218-run stand in four and a half hours has placed Sri Lanka in a tight corner as their bowlers struggled to contain Pakistan's two most experienced batsmen.
Sri Lanka twice missed dismissing Misbah on 69 when Mahela Jayawardene
dropped a sitter, and on 76 they didn't go for a TV referral when fast-bowler
Suranga Lakmal (1-84) could have earned an lbw verdict after onfield umpire
Richard Kettleborough of England turned down a strong appeal.
Sri Lanka started off well by claiming two wickets inside the first hour but took only one more wicket in the day as Khan and Misbah ensured Pakistan take a sizeable lead against Sri Lanka's 204-run first innings effort.
Misbah completed his fifth Test century soon after Khan was dismissed when he drove offspinner Sachithra Senananyake to mid-on for a single.
Earlier, Sri Lanka had the wickets of Mohammad Hafeez (11) and Ahmed Shehzad (38) soon after Pakistan resumed from 46-1 overnight, but then Misbah and Khan took charge.
Both batsmen guided Pakistan to 121-3 by lunch before they cut loose by scoring 130 runs in the second session with the pitch considerably easing for batting.
Khan completed his half century off 100 balls with nine fours when he hit Suranga Lakmal for two boundaries in one over.
Misbah, who finished last year as top-scorer in One-Day Internationals, hit identical fours and faced a similar number of deliveries to complete his 50.
Misbah survived a leg before wicket television referral off Rangana Herath on 48 as the replays clearly suggested the ball got a faint inside edge of the Pakistan captain's bat before hitting the pads.
Khan equalled Pakistan great Javed Miandad's number of Test centuries when he drove Herath to the cover boundary just before tea as he raised his second 50 off only 47 deliveries.
Khan trails only Mohammad Yousuf (24) and Inzamam-ul-Haq (25) on Pakistan's list of leading test centurions.