Battle-weary England dug in for a gripping draw with just one wicket left to deny dominant Australia a 4-0 series lead in the fourth Ashes Test in Sydney on Sunday.
Number 11 batsman James Anderson safely played out a tense 102nd and final over from leg-spinner Steve Smith in deteriorating evening light as England ended on 270 for nine chasing a 388-run target in a heart-pumping finish.
It all came down to the last six balls at the Sydney Cricket Ground with eight fielders crowding around the bat as Anderson fended off Smith's part-time leg-spin.
Australia had dominated the majority of the match, declaring twice and turning every apparent setback they faced into an advantage.
Man of the Match Usman Khawaja came into the side for his first Test in more than two years and scored centuries in both innings as a middle order replacement for Travis Head, who had tested positive for Covid-19.
Australia had looked set to pull off a thrilling victory when they claimed the ninth wicket with Jack Leach caught in the slips by David Warner off Smith for 26 to spark jubilant scenes.
But Anderson and fellow veteran paceman Stuart Broad played out the remaining two nail-bitingly tense overs to give the beleaguered tourists a morale-boosting fighting draw after losing the Ashes series 3-0 inside 12 days.
Ben Stokes with a gutsy 60, his second half-century of the match, and first-innings centurion Jonny Bairstow's 41 held up the Australian victory charge.
But once both departed after tea, the Australians were relentless in taking the struggle down to the final over.
The draw means that Australia no longer have the chance of a 5-0 series clean sweep with the fifth and final Test to be played in Hobart, as a day-night match, getting under way on Friday.
Bairstow's brave effort came to an end with 10.4 overs left when he was caught close in by Marnus Labuschagne off Scott Boland.
Bairstow, who batted with an injured thumb, backed up his first innings century with a determined 105-ball knock and was England's last recognised batsman to fall.
Nathan Lyon made a key breakthrough with the wicket of Stokes, who defied the Australians for 123 balls. It was Lyon's 16th wicket of the series, the most among the Australian bowlers.
Lyon got extra bounce, Stokes, troubled by a side strain injury, was in two minds and couldn't get his bat out of the way and was caught by Smith at slip.
Pat Cummins produced a big inswinger to trap Jos Buttler lbw for 11, confirmed on a review, to get into the English tail as the overs counted down.
Mark Wood lasted just two balls before Cummins snared him lbw for a duck, again after a review, the inswinger hitting his front foot on the toes.
Boland earlier removed England captain Joe Root caught behind off a tantalising outswinger for 24 to break up his stubborn 60-run partnership with Stokes.
Boland has had a phenomenal introduction to Test cricket since his debut in last month's Melbourne Test where he was man of the match with 6-7 in the second innings and so far he has taken 14 wickets in the series at 8.64.
Cameron Green grabbed the biggest breakthrough of the morning with the wicket of Zak Crawley, who had made 77, just as the English opener was looking like he would score a hundred in a flowing performance.
The young giant ripped a yorker under Crawley's bat, striking his boot in front of the wicket and the Englishmen was given out and then lost the review.
Crawley impressed during his 100-ball knock with 13 fours, batting with positive intent and doing more than enough to keep his opening spot with Rory Burns likely to return to partner him for the final Test after another failure from Haseeb Hameed.
Hameed, who was dropped by wicketkeeper Alex Carey, went three balls later when he was caught by Carey off Boland for nine.
Dawid Malan was next to go, for four, deceived as he tried to cut a quicker ball from Lyon that skidded on to his off-stump.