Fourth Ashes Test, Sydney (day five of five)
Australia 416-8 dec & 265-6 dec (Khawaja 101*, Green 74; Leach 4-84)
England 294 & 270-9 (Crawley 77, Stokes 60, Boland 3-30)
Match drawn; Australia lead series 3-0
England clung on for a tense draw on the final day of the fourth Test in Sydney to end Australia's hopes of an Ashes clean sweep.
The tourists were 13 balls from safety when Jack Leach edged Steve Smith behind, leaving it to Stuart Broad and last batter James Anderson to guide England home.
With the light fading and every Australia fielder around the bat, Broad and Anderson blocked out Smith and Nathan Lyon to secure a hard-fought draw, closing on 270-9.
Zak Crawley earlier made a fluent 77 and Ben Stokes hit 60 despite still struggling with his side injury as England crept towards safety.
Boland continued his extraordinary start to Test cricket with 3-30, while captain Pat Cummins took two wickets in three balls to rattle England.
It was a thrilling end to an entertaining match, with England's players barely able to watch in the dressing room as Anderson played out the final over.
Australia may be left to rue their late declaration on the fourth day, with rain meaning they lost seven overs as they tried to force victory on Sunday.
The final Test of the series – a day-night match in Hobart – begins on 14 January.
England may have already lost the Ashes but here they showed real fight and character throughout the match.
Jonny Bairstow displayed grit with his first-innings century and that energy and determination filtered back to the dressing room as the tourists fought to repel Australia on an absorbing final day.
The small crowd at the Sydney Cricket Ground were at their loudest in the final hour, as Australia tore in with the new ball.
Cummins, who had been subdued with the ball throughout the day, trapped Jos Buttler lbw on review before doing the same to Mark Wood two balls later with a delivery that knocked the bowler off his feet.
That left it to Bairstow, nursing an thumb injury that may keep him out of the next Test, and Leach, one of the heroes of Headingley 2019, to see off 15 overs.
Australia felt the pressure, with Smith dropping Bairstow off Mitchell Starc, but they would have felt victory was in their grasp when the same batter popped a catch to silly mid-off.
Leach and Broad withstood some short, fast, hostile bowling, all accompanied by the chirping of the players around the bat, before a disappointed Leach edged Smith to slip.
It was left to Broad and Anderson, the veterans, to see England home and give them something to smile about after a bruising tour.
Positives have been few and far between for England, but Crawley's performance in the morning session hinted at what could be in the coming years.
Having started strongly the previous night, Crawley refused to let the bowlers settle. He pulled and drove the off-colour Starc before flicking Lyon away to bring up a 69-ball half-century.
Just as Bairstow and Stokes did on the third day, Crawley threw Australia off their plans, dominating the bowling with his elegant strokeplay.
By the time he fell, trapped by an excellent yorker from Cameron Green, he had scored 77. The other three England batters had scored 19 runs between them.
Crawley also shared a 43-run stand with fellow opener Hameed. That this was England's third highest opening partnership in the last four Ashes series underlines how long their Test batting has been falling away.
Hameed battled admirably but struggled for the fluency Crawley was showing at the other end.
He was dropped by Alex Carey off Cummins but could not make it count, instead fiddling Scott Boland behind for nine to register his sixth consecutive single-figure score. It seems highly unlikely he will feature in the final Test at Hobart.
Dawid Malan played a poor shot to Lyon and was bowled, Root was left aghast as he nicked Boland behind and Stokes, having battled so bravely, almost punched his bat as he sent a simple catch off Lyon to Smith at slip.
England have still to pass 300 on this tour, and while the draw in Sydney will raise their spirits, they will know that the same batting problems still linger in the background.
England captain Joe Root, speaking to Test Match Special: "Relief is the overwhelming emotion and I'm quite proud too. We had a lot thrown at us in this game and the guys have really stood up and showed a lot of character and pride.
"Today shows how much it means to them. When you find yourself out of the series it is really important you front up and time and time again show how much it means to you. I think everyone has done that this week."
Australia captain Pat Cummins: "That was a great game of Test cricket. We got close. The weather forecasts are hopeless. I learned that this week.
"I thought we'd left ourselves enough time. Today was good fun."
Player of the match Usman Khawaja: "It could have gone either way. We couldn't have asked for much more.
"I'm enjoying the game. I love it. There are ups and downs. I know the next time I play I could get two ducks."