England held off Pakistan's fightback to end day three of the second Test on top, with the late dismissal of Imam-ul-Haq teeing up a nail-biting finish in Multan.
Pakistan made a flying start as England were bowled out for 275 in the opening session, and despite being reduced to 83-3 after lunch, the hosts appeared to be in the ascendency thanks to a fine partnership between Imam (60) and Saud Shakeel (54 not out).
There was a final twist as the light drew in, however, as Imam handed Joe Root a simple catch at slip, leaving England requiring six wickets for a series victory as the momentum shifted once more.
The fact England began the day 202-5 owed much to a fine knock from Harry Brook, and the right-hander wasted little time in bringing up his second Test century as the tourists built a 355-run lead.
However, Pakistan soon had their first wicket of the day when Mohammad Ali produced a terrific catch in the deep from Ben Stokes (41), before the Test's breakout star Abrar Ahmed claimed his 11th of the match to remove Ollie Robinson (3).
But it was Zahid Mahmood who took centre stage with a three-wicket haul as England were all out for 275, bowling James Anderson (4) lbw after handing Shakeel a catch from Brook (108).
Pakistan's hopes of chasing down their target looked forlorn when England claimed three quickfire wickets after lunch, the highlight being Robinson's terrific seamer to skipper Babar Azam (1).
The hosts initially made light of those dismissals as Imam and Shakeel took up the mantle, but the former's wild swing at Jack Leach's routine delivery could prove costly.
Root was on hand to make the catch at close quarters, dealing a serious blow to Pakistan's chase at the end of a topsy-turvy day.
Set up brilliantly for tomorrow!
— England Cricket (@englandcricket) December 11, 2022
We need six wickets to win, Pakistan require 157 runs.
Scorecard: https://t.co/cHFKg2M38Q
#PAKvENG pic.twitter.com/abCHMyzPsm
Brook repeats the trick
Brook made the third-fastest Test century in England history as Brendon McCullum's men got off to a flying start to the first Test last week, and while his second ton was not quite as emphatic, it could prove equally crucial.
The 23-year-old's century – his second in three Test appearances – gave England something to defend as Pakistan began their fightback.
Zahid and Imam efforts in vain?
Zahid was the star of the opening session as his three-wicket haul helped cut England's second innings short, with this display representing a vast improvement on his underwhelming debut in the first Test.
Imam, meanwhile, looked to have put Pakistan on course for a successful chase with his knock of 60, but his late swing at Leach's ball may end up costing his side the match.