Stokes hit 115 not out, his first century in two years, to set up the declaration, with the ferocious pace of debutant Archer and the nagging left-arm spin of Leach piling the pressure on Australia in a suitably tense finale.
The tourists, without key man Steve Smith due a concussion caused by a vicious Archer bouncer the previous afternoon, finished on 154-6 under failing light just before 7.30pm.
Stokes played wonderfully for his seventh Test hundred, allowing Joe Root the luxury of declaring 266 ahead with 48 overs left in the day, but the real tension revealed itself as England pursued the win during a compelling fourth innings.
Archer once again provided the adrenaline, rattling bodies, rapping helmets and taking three wickets to cap a remarkable first appearance, while Leach proved a brilliant foil with three of his own in the evening session.
Australia retained their 1-0 series lead courtesy of Smith’s concussion substitute Marnus Labuschagne, who made 59, and Travis Head, who finished 42 not out but was badly dropped by Jason Roy earlier in his innings.
Day four ended with all four results possible, but rain delayed the start yesterday by 70 minutes, shaving 10 crucial overs off a contest that had already lost five full sessions.
By the time England declared just before 3.30pm they had effectively taken an Australia win off the table too. A quick collapse would have left them vulnerable, but Stokes and Jos Buttler closed off that avenue, adding 61 runs without loss before lunch.
Having run through England on day five at Edgbaston much of the expectation was on off-spinner Nathan Lyon. He had seen Stokes dropped at slip the previous evening as well as trapping him lbw with a rejected appeal that went unreviewed, but was struggling to wreak the same havoc.
In the end he finished with 0-102, his box of tricks seemingly empty.
With the spadework done, England attacked. It cost Buttler his wicket, pulling Pat Cummins to long-leg off the top edge for 31, but helped them add 101 quick runs.
Jonny Bairstow showed the way, smashing his seventh ball for six, and Stokes was quick to follow suit by slog-sweeping Lyon over the ropes twice in a row.
Stokes had reached his 51 in 112 balls before lunch, but needed only 48 more to convert his century.
On 99 he missed a reverse sweep as Lyon dropped one down leg, but two balls later a nudge-and-run brought him his long-awaited seventh century.
A few more flourishes followed before Root waved his men in, kicking off a belated victory push.
Archer took only nine balls to deliver on the crowd’s lofty expectations. Coming around the wicket with his usual hustle and pace he had David Warner smartly caught by Rory Burns at third slip. Warner has now scored 18 runs in four innings and looks well short of his combative best.
Usman Khawaja was next in Archer’s sights, pushing at one that shaded away and edging to Bairstow. Archer wheeled away in delight, braids flapping, roared on by the crowd.
This dismissal brought Labuschagne in as Smith’s alternate and it took Archer just two balls to leave the concussion replacement undergoing medical checks of his own, the second rearing up and pounding the grille at an eye-watering 91.6mph.
Archer, at the age of just 24 and on his first appearance at this level, had doubled down on his status as the most dangerous man in the sport.
Labuschagne, cleared to continue with a new helmet, joined Cameron Bancroft to reach tea on 46-2, leaving England 35 overs to try to wrap things up.
Leach struck in the first of them, trapping Bancroft lbw with one that stayed low only for the next 22 to tick by with a single dropped catch to show – Roy reprieving Head and frustrating Stokes.
Labuschagne finally fell in contentious circumstances, given caught when Root scooped a deflection off short-leg’s body at the last possible moment. Lacking conclusive contrary proof third umpire Joel Wilson went with the ‘soft signal’ and Labuschagne was gone.
Leach struck again with his next ball, Matthew Wade bat-pad for one, before Archer’s latest hostile spell did its work.
After a sequence of awkward bumpers Tim Paine pulled to midwicket, where Joe Denly launched himself into a staggering one-handed take. Leach almost took his fourth, Burns nearly hanging on to Cummins at silly point, but the visitors did enough to see it through under murky skies.
Even so, England captain Root believes his side have seized the Ashes momentum ahead of the third Test that starts at Headingley on Thursday.
Root said: “I think it was important that we bounced back strongly after Edgbaston and I think we’ve certainly done that.
“We’ve proved that we’re still in this series and we will take that momentum going into the next game.”
He said he had no regrets about the manner in which his team came up short after their chances were drastically reduced by the earlier rain.
“It could have made a big difference but you can’t control the weather,” added Root. “We had to get ourselves to a score where we thought we were in control of the game and we managed to do that.
“Ben (Stokes) played exceptionally well and then we threw everything we could at them, and fair play to Australia, they managed to hold on.”