Rehan Ahmed (2R) celebrates with Ben Stokes (2L) after taking the wicket of Babar Azam (L) at the National Stadium in Karachi on Monday. AFP
Ahmed, who at 18 years and 126 days old on Saturday became the youngest man ever to play a Test for England, grabbed 5-48 to bundle Pakistan out for 216, giving his team a target of 167 runs with 75 minutes and two days to play.
Openers Zak Crawley and Ben Duckett plundered 87 by the 12th over before spinner Abrar Ahmed dismissed Crawley for 41 and Rehan Ahmed for 10.
Duckett was unbeaten on 50 and skipper Ben Stokes 10 as England, 112-2 at the close, need just 55 runs to inflict a first-ever whitewash on Pakistan on their home soil.
England, on their first Test tour of Pakistan in 17 years, won the first Test in Rawalpindi by 74 runs and the second in Multan by 26 runs.
Pakistan fell prey to a spin-assisting National Stadium pitch, losing their last seven wickets for a mere 52 runs, with skipper Babar Azam scoring 54 and Saud Shakeel 53. Rehan Ahmed said he felt great after his performance.
"I don't think it has sunk in yet, but yes I am very grateful," he said, admitting Azam's scalp was special despite it being a poor ball. "I bowled better balls and not got wickets, so to get a wicket is nice, especially when it is Babar."
Rehan Ahmed built on fellow spinner Jack Leach's three wickets off just six balls in the morning session by taking his first three off just 17.
He left Australian fast bowler Pat Cummins behind who, at 18 years 193 days old, took five wickets in his debut Test against South Africa at Johannesburg in 2011.
Surprisingly, Ahmed had not bowled in the first session, which saw Pakistan reach 99-3. Ahmed came on after Azam and Shakeel had put on a valiant rebuilding effort through a fourth-wicket stand of 110 runs.
The pair took Pakistan to 164 before the skipper made an uncharacteristic misjudgement, soon after he reached 1,000 Test runs for the year.
Leach had Pakistan reeling after he knocked over openers Shan Masood and Abdullah Shafique and veteran Azhar Ali, appearing in his last match, with only one run added.
Ahmed oversaw an equally brutal passage of play, removing Azam, Mohammad Rizwan (7) and Shakeel in the space of six overs for the addition of a paltry 13 runs.
Mohammad Wasim (two) and Agha Salman (21) also fell to Ahmed. Shakeel admitted his side had made key mistakes in their innings.
"We committed mistakes, especially Babar and I played loose shots and that caused a collapse... which it was tough to overcome," he said.
Pakistan started the fourth day on nearly even footing, with openers Shafique and Masood looking set and erasing England's 50-run lead without the loss of a wicket. But any optimism was snatched away by England's methodical spinners.
Leach bowled Shan -- attempting an ill-advised reverse sweep -- for 24, the dismissal sparking the first cluster of wickets. Top-order stalwart Azhar Ali was denied a fairy-tale ending to a storied career that has spanned 97 Tests and 7,142 runs.
Azhar was beaten by spin as he played a forward push on the final ball of Leach's momentum-changing double-wicket maiden. His stumps shattered, Azhar walked off the field for the last time, ending 12 years as a first-team regular.
The England players clapped as Azhar trudged back to the dressing room, while Pakistan's players raised their bats at the boundary for a ceremonial guard of honour. Among the handful of spectators were Azhar's wife and two sons.
England, which bagged a 79-run first innings lead, reached 89-3 at tea on the second day with Ben Duckett (58 not out). It was a rare quiet session by England after it beat Pakistan by 74 runs in the first Test thanks to an ultra-attacking batting display.
Stokes said it was "a very special time to be an England cricketer" but that the team need to keep their feet on the ground. "One thing we do is we stay in the moment," he said.
Openers Zak Crawley (122) and Ben Duckett (107) set the tone with quick-fire tons against a hapless Pakistan bowling attack before Ollie Pope (108) and Harry Brook (101 not out) compounded the hosts' misery.
England's Nat Sciver-Brunt hit an unbeaten half-century to steer Mumbai Indians to a tense seven-wicket victory over Delhi Capitals in the final of the inaugural Women's Premier League on Sunday.
Roberto Rodriguez and Martin Nochese defeated Jonathan Green and Colin Marshall, while Javier Garcia Lopez and Sergio Icardo Alcorisa got the walkover to reach quarter-finals of the 100-point classification category of the Padel Championship at the 10th edition of the NAS Sports Tournament.
Delivering a power-packed performance, the UAE team emerged as champions at the Jiu-Jitsu Championship of the 10th Nad Al Sheba (NAS) Sports Tournament 2023 in Dubai on Friday.