Abu Dhabi - Left-hander Taufeeq Umar compiled a resolute 236 on Thursday as Pakistan continued their domination of Sri Lanka on day three of the opening Test at the Sheikh Zayed Stadium.
Taufeeq's 12-hour stand piloted Pakistan to 511-6 declared in reply to Sri Lanka's modest first day total of 197, a lead of 314 on the first innings.
Taufeeq, in his 33rd Test, struck 17 fours and one six off 496 balls.
Umar Gul then completed another fine day for Pakistan by removing opener Tharanga Paranavitana with the first ball of Sri Lanka's second innings.
The visitors got to close on 47-1, still behind by 267 and facing a huge task to stave off defeat over the last two days.
Lahiru Thirimanne (20) and veteran Kumar Sangakkara (27) were unbeaten at stumps.
Earlier, Taufeeq converted his sixth Test century into a memorable career-best as Pakistan, overnight 259-1, consolidated their supremacy.
The 30-year-old Taufeeq, who anchored Pakistan on day two in an opening stand of 118 with Mohammad Hafeez, got support from all Pakistan's middle order.
Azhar Ali (70) and Younus Khan (33) were equally staunch in method while captain Misbah-ul-Haq provided impetus with 46 off 52 balls.
Left-arm spinner Rangana Herath led the Sri Lankan bowling with 3-126 from 61.4 overs while left-arm seamer Chanaka Welegedara claimed 2-80.
Welegedara energised the visitors with an early breakthrough as he produced a beauty of an in-swinger to bowl Azhar Ali at 278-2.
Ali struck six fours off 198 balls and shared a second wicket stand of 160 with Taufeeq.
But Taufeeq found another solid ally in Younus and the pair added a further 82 either side of lunch.
Younus was given a life when on 16 as wicket-keeper Prasanna Jayawardene floored a leg side deflection off Herath.
Welegedara eventually removed the right-hander half an hour after lunch at 360-3 as another in-swinger brought an lbw verdict. Younus hit one boundary off 94 balls.
Misbah lifted the tempo of an innings which had been meandering a bit, clouting a six and four fours and scoring at nearly a run-a-ball.
He fell just short of a half century when Herath gained Tony Hill's verdict for a wicket-keeper's catch although it appeared to brush his shirt and not edge.
Taufeeq, who had benefited from a Hill error late on day two, continued to grind the Sri Lankans, calmly motoring to a maiden double century shortly after tea.
He reached his landmark with a thumping pull through mid-on off Suranga Lakmal for his 16th boundary. He sunk to his knees in prayer before being congratulated by Sri Lankan veterans Sangakkara and Mahela Jayawardene.
Taufeeq surged on afterwards, freeing himself to launch his only six over long-on off Herath.
He was eventually run out just before the declaration, too late turning back trying to seek a single to square leg.
Umar Gul fell to Herath trying to swing big but soon made a bigger impact with the ball after Misbah declared with an hour remaining.
His first delivery trapped Paranavitana in front and Sri Lanka were in peril at 0-1.
But the two left-handers Thirimanne and Sangakkara battled hard and survived to the close.