Pakistan openers Abid Ali and Shan Masood smashed hundreds and forged a 278-run stand to flatten Sri Lanka in the second and final test in Karachi on Saturday.
Bundled out for a paltry 191 in the first innings, Pakistan finished day three on 395-2, with a commanding lead of 315 runs, after a vastly improved batting display at Karachi's National Stadium.
Abid, followed his century on debut in the drawn Rawalpindi test with a career-best 174, which included 21 boundaries and a six.
Shan's 135 was also his highest test score, studded with three sixes and seven boundaries.
Skipper Azhar Ali (57) and Babar Azam (22) will return on Sunday hoping to bat Sri Lanka out of the contest and inch closer to a series victory.
On a pitch offering little to the bowlers, Abid and Shan batted fluently to deny the Sri Lankans in the morning session when they scored at a four-and-half per over rate.
Abid took two off left-arm spinner Lasith Embuldeniya to bring up his century and it did not take long before Shan completed his hundred.
The last time both Pakistan openers smashed centuries in the same innings was in 2001 when Saeed Anwar and Taufeeq Umar got hundreds in a Multan test against Bangladesh.
Lahiru Kumara finally separated the duo when Shan attempted a pull shot and the top-edge found Oshada Fernando at deep square leg.
It was the end of Pakistan's highest second-innings stand for any wicket.
Abid was looking good for a double century but he perished lbw trying to flick Kumara.
The two-match series, part of the World Test Championship, marks Pakistan's first tests on home soil since the 2009 militant attack on Sri Lanka's team bus in Lahore.