Pakistan 191 (Shafiq 63, Babar 60, Kumara 4-49, Embuldeniya 4-71, Vishwa 2-31) and 555 for 3 dec (Abid 174, Masood 135, Azhar 118, Babar 100*, Kumara 2-139) need three wickets to beat Sri Lanka 271 (Chandimal 74, Afridi 5-77, Abbas 4-55) and 212 for 7 (Oshada 102*, Dickwella 65, Naseem Shah 3-31)

If yesterday was the most magnificent day of Test cricket Pakistan have enjoyed this year, it was swiftly topped by the proceedings today. All the while Abid Ali and Shan Masood piled up that record partnership and Azhar Ali got in amongst the runs on Saturday, there remained the nagging doubt the pitch was so docile it would be difficult for Pakistan's bowlers to force a result.

But in front of a Sunday crowd that was the biggest of the series, Pakistan rubber-stamped that batting dominance with control in the field, too, and despite a 100-run stand that Pakistan only breached in the final half hour, the hosts are just three wickets away from what looks a routine win. It didn't mean there were no heroics with the bat, though; Azhar and Babar Azam brought up their hundreds, this becoming only the second instance of the top four all getting to three-figures in Test cricket. Sri Lanka were set an academic 476 to win, Pakistan having amassed an eye-watering 555 for 3.

ALSO READ: Tons for top four - Pakistan's rare feat in Karachi

If the centuries Abid and Masood compiled yesterday were essential, Azhar and Babar's offerings were simply joyous. There was no scoreboard pressure; with Sri Lanka's bowlers rendered toothless, the only question was when Pakistan would put the visitors back in to bat. Azhar would end a drought of over a year without a hundred, and having been recently handed the captaincy, he will know how pivotal it may prove to extending his tenure.

The half-century yesterday would have both calmed Azhar's nerves and whetted his appetite. The rut he's been in extends, in truth, to well beyond this recent patch, with the right-hander averaging a mere 25 since Misbah-ul-Haq and Younis Khan retired in 2017. Three consecutive boundaries off Vishwa Fernando took him to within two runs of three-figures, and when a cut off Lasith Embuldeniya finally got him over the line, the radiant glow on Azhar's face spoke volumes of the importance he placed on the innings. He would lock Babar into a tight embrace, Pakistan's Test captain and vice-captain celebrating a partnership that well and truly took the game out of Sri Lanka's reach.

It wasn't so much the stand between the two as the rate the runs came that allowed Pakistan to bring their declaration forward. Babar was chiefly responsible for that, and once he'd had an lbw call overturned early on, and then trotting to a half-century, he would spare no bowler from an onslaught that saw him racing towards three-figures himself. Ninety-five came off the first 19 overs before drinks were taken, and when Azhar was stumped dancing down the crease and missing the line, Babar would only press down on the accelerator harder.

Lahiru Kumara was tonked for three fours in an over, and as the lead crossed 450, it appeared Babar's hundred was the only thing keeping Pakistan from calling the batsmen back in. It was a matter of time, and very little time at that. In the final over before lunch, he would cut one away to point and bring up his third century in four Test matches, having taken little over a session to get there.

When Sri Lanka batted, the pitch suddenly didn't look as flat anymore. After a solid first 45 minutes, the visitors lost two wickets in quick succession. Captain Dimuth Karunaratne nicked off to Mohammad Abbas - who was suddenly back to that nagging fourth-stump line from around the wicket - with Mohammad Rizwan taking an excellent catch. The next over, Mendis edged one for Babar at third slip to gobble it up. That put to bed any suggestions Pakistan would be condemned to toiling in the same way as Sri Lanka, and when Angelo Mathews nicked off to Shaheen Shah Afridi, Sri Lanka were staring down the possibility of the game ending with a full day to spare.

What will hearten Pakistan is the vastly improved showing from Naseem Shah, perhaps a touch unlucky to finish the first innings wicketless. His pace remained high and he would repeatedly threaten the outside edge, accurate both with the shorter delivery and the fuller one, with the batsmen regularly struggling with their footwork off the teenager.

Naseem thought he had Oshada Fernando's wicket before replays showed there was a thin inside-edge, but DRS would come to his aid the next over, when the umpire turned down a close lbw shout that was revealed to be smashing into Dinesh Chandimal's middle stump. When Yasir Shah had Dhananjaya de Silva chop on off a straighter one, Sri Lanka had lost half their side with only 97 on the board.

In what has been a disastrous two days for Sri Lanka, Oshada's unbeaten 102 stands out as a bright spot that may continue to benefit the visitors until after this tour is done. Thrust into the opener's slot in place of an out-of-form Lahiru Thirimanne, the makeshift opener showed glimpses he belonged there in the first innings in Rawalpindi, and confirmed it with an unbeaten hundred even as his side crumbled around him.

Oshada expertly got his front foot behind the line of the ball, rarely finding himself out of position, or particularly troubled during any part of the two sessions he was at the crease. With him at the stumps, you might have suspected Pakistan were still batting if it wasn't for what happened at the other end.

Niroshan Dickwella was the only one to give him solid support, his half-century coming in an entertaining partnership where the left-hander repeatedly took on an out-of-form Yasir with the reverse sweep, coming out on top each time. Yasir didn't quite have an answer to that shot, and such was Dickwella's control over it, he would find the gap no matter the field placement. Yasir's figures, very quickly, began to look expensive.

It was only when, ironically enough, Dickwella tried the reverse sweep on Haris Sohail, Pakistan's part-time left-arm spinner, that the shot let him down, with the ball clattering into his stumps. Naseem would add Dilruwan Perera to the contingent already in the pavilion. Although the players will have to come out tomorrow, make no mistake, this game, and Sri Lanka, are done and dusted.

Danyal Rasool is a sub-editor at ESPNcricinfo. @Danny61000