Australia has beaten Afghanistan, just, but needs England to lose to Sri Lanka at the SCG on Saturday if they are to progress to the semi final of the T20 World Cup.
The four-run victory moves the defending champions into second place in Group One behind New Zealand, who thrashed Ireland by 35 runs to confirm their spot in the semi's earlier in the day.
However, by failing to beat Afghanistan by more than 63 runs, Australia was unable to improve its net run rate enough to surpass England's, meaning qualification for the semi finals is now in the hands of their Ashes rivals.
An unbeaten 54 runs from player of the match Glenn Maxwell and 45 from Mitch Marsh helped Australia reach 8-168 in its 20 overs on a perfect night in front of 18,672 at Adelaide Oval.
Australia probably should have scored more, but were limited by some decent death bowling by Afghanistan who recovered well to take three wickets in the final four overs.
Setting Afghanistan an unlikely 169 to win their first game of the Super 12 phase, Australia at times struggled to make inroads, as Gulbadin Naib in particular cut loose on a decent batting track.
A nine-ball spell in which Australia took 4-4 looked like it might precipitate an easy victory and keep the pressure on England, but that was to ignore the influence of Rashid Khan, whose 23-ball 48 got Afghanistan to within four to leave Australia's hopes of defending the T20 World Cup relying on Sri Lanka beating England.
Australia made three changes from the side that beat Ireland in Brisbane on Monday, two of them enforced as skipper Aaron Finch and all-rounder Tim David failed to recover from injuries.
Death-bowling specialist Mitchell Starc — who has only taken 3 wickets in his three matches so far at an average of 34.00 — was also left out.
Their places were filled by Kane Richardson, Steve Smith and Cameron Green — who opened with David Warner after Australia were asked to bat in ideal conditions at Adelaide Oval.
Green's stay was brief though, a two-ball 3 all he could muster before being caught at slip off the bowling of Fazalhaq Farooqi.
Warner was playing — and running — like a man possessed, turning twos into threes and piling pressure upon the Afghanistan fielders.
But Naveen-ul-Haq Murid came on and made an immediate impact, claiming the wickets of Warner (25 off 18) and Smith (4 off 4) in his opening over.
The very next ball after Smith's wicket, Marsh was horribly dropped by Najib Zadran at point.
Marsh was on 20, with Australia 3-52, the dropped chance bringing Afghanistan's building momentum to a shuddering halt.
Marsh (45 off 30) profited from that mistake, hitting the ball nicely, but he fell just after the mid-innings break to a Mujeeb Zadran ball that was well taken by wicketkeeper Gurbaz.
That brought Maxwell to the crease, and he wasted no time in stamping his authority over the Afghani bowlers and their increasingly ragged fielding efforts.
He made the bulk of the 53 runs for the fifth wicket partnership with Marcus Stoinis (25 off 21), before he was caught at point after a loose drive off Rashid Khan — the Adelaide Strikers spinner's 45th T20 wicket in 30 matches at the Adelaide Oval.
Maxwell continued to plunder runs, reaching his 50 off 29 balls, as Australia looked to accelerate.
However, the lack of a partner capable of staying with him stymied Australia's chances of achieving a the massive total they felt they'd need to really put the pressure on England.
Fazalhaq bowled stand-in skipper Matthew Wade (6 off 8) with a spectacular yorker and Pat Cummins (0 off 2) was brilliantly caught by Rashid, sliding in from deep point.
Richardson (1 off 1) was then run out at the non-strikers end after some excellent fielding off his own bowling by Naveen-ul-Haq as Australia made 8-168.
To pass England's net run rate, Australia needed to restrict Afghanistan to under 106 runs.
Their task got off to a brilliant start when Usman Ghani was well caught by Cummins off the bowling Josh Hazlewood for a seven-ball 2.
Gurbaz hit two massive sixes and two fours as he made his way to 29 in quick time, at which point he was dropped by Green.
Fortunately for Australia, he departed next ball for 30 as Richardson backed up his selection over Starc with a wicket in his first over of the tournament.
Less fortunately, it meant Ibrahim Zadran and Gulbadin Naib joined forces in the middle, and visibly grew in confidence as delivery after delivery sailed towards and over the boundary rope with little regard to the reputation of the bowlers they were dispatching — nor the occasion they were upsetting.
But three wickets in the 14th over, bowled by Adam Zampa, turned the tide firmly back Australia's way.
A direct hit from Maxwell in the deep accounted for Gulbadin for a 23-ball 39, breaking a 59-run partnership for the third wicket, with Ibrahim falling the next ball to an ill-advised sweep for a 33-ball 26.
Then, Najib Zadran holed out to Maxwell for a two-ball duck, leaving Afghanistan reeling at 5-101 having been 2-98 at the start of the over.
It got worse.
Nine balls after the run out, Mohammad Nabi picked out Warner in the deep. Afghanistan had lost 4-4 and had gone from potentially challenging for a win to desperately hanging on to some pride.
That should have been that, but Afghanistan never stopped fighting, with Rashid Khan in particular cutting loose with some enormous sixes to reduce the equation to 22 off the final over, to be bowled by Stoinis.
Darwish Rasooli (15 off 13) sacrificed himself, running himself out off a wide to get Khan back on strike.
A dot, a four, a dot and then a massive six gave Afghanistan hope of a miracle, needing just 11 off 2.
But a mishit two off the penultimate ball meant the four of the final delivery was irrelevant, as Australia squeezed home by just four runs.
Look back on how all the action unfolded as it happened in our live blog.
Key events
To leave a comment on the blog, please log in or sign up for an ABC account.
Live updates
By Dean Bilton
All eyes on Sri Lanka tomorrow!
That's it from us for tonight, but never fear! The blog will return tomorrow night for the all-important England-Sri Lanka game that will now decide Australia's fate. It promises to be a nervy and dramatic evening at the SCG, so please do come keep us company for that one.
But for tonight, that's where we will leave you. Thanks for hanging out, we'll see you again tomorrow.
By Dean Bilton
Glenn Maxwell is player of the match
Maxwell gets the nod for his 54* and critical run out, which hindsight might say won the game for Australia.
By Dean Bilton
Australia win by four runs!
Somehow it feels like a loss for both teams. Rashid Khan was just four runs away from carrying Afghanistan to surely the greatest T20 win in their history, while Australia have limped over the line in a game they really needed to win with authority.
The Aussie faces are pretty long right now, as their fate is now entirely in the hands of Sri Lanka. If England win that game tomorrow, it's curtains for Australia's World Cup defence. And on tonight's evidence, they are some way short of the best T20 nations in the world anyway.
The batting performance stuttered over the line, falling well short of the total they had been aiming for before play. While the bowling, aside from one match-winning Adam Zampa over, was just barely good enough to protect the total.
Is that it for Australia at this World Cup? We'll find out tomorrow.
By Dean Bilton
20th over - Stoinis has five to come
Rashid swings hard but chunks it straight to short fine leg! He could have put that anywhere. Dot ball.
FOUR RUNS! Bad ball, full and wide down the leg side! Rashid clips it over short fine leg and finds the rope.
They need 17 off four balls.
Rashid pounds one to cow corner but doesn't take the single. Rashid needs to hit three consecutive sixes to win the game.
THERE'S ONE OF THEM! SIX! No way. He couldn't. Surely. Rashid has belted Stoinis over square leg for six. 11 needed off two...
IT'S HIGH! IN THE AIR! Safe! But not six! They run two. And that should be it. Unless Stoinis bowls a wide or a no ball, Australia have won. They need nine off one ball.
FOUR! Rashid hits it for four! It's not going to be enough, but that was absolutely spectactular from Rashid Khan and Afghanistan.
By Dean Bilton
RUN OUT! Darwish Rasooli is out
He's sacrificed himself for the cause. The equation is now 21 runs from six balls thanks to the wide, plus Rashid Khan is now on strike.
By Dean Bilton
20th over - Marcus Stoinis bowling, Afghanistan need 22 to win
It's an incredibly tall order, but never say never.
CHAOS! It's a wide to start with, but Afghanistan take off for the bye as well! Rashid makes his ground, but Stoinis throws down the non-striker's end stumps. Darwish is surely run out...
By Dean Bilton
19th over - Josh Hazlewood will bowl it
Afghanistan believe they can still win this. If Rashid Khan gets some strike, they might be right.
A dot ball to start from Hazlewood. Very wide though, inside the line by a sliver. I guess you could call it perfect.
Darwish takes the quick single and brings Rashid on strike. Now or never for Rashid Khan and Afghanistan.
Rashid has swung and missed at a wide full toss and has somehow ended up laying on his face. Dot ball.
SIX! Rashid has done it again! Didn't get all of it, but got more than enough to send it over the mid wicket fence!
26 from eight balls required.
Swing and a miss! Rashid is furious with himself, he thinks he should have sent that one over the rope too.
FOUR RUNS! Over mid off and all the way to the rope! It might not end up being enough, but this has been special from Rashid Khan.
22 required from the last over. Here goes nothing.
By Dean Bilton
18th over - Richardson to complete his spell
Darwish takes one from the first ball of the over.
And from the second and third balls too. Singles aren't going to come close to being enough for Afghanistan - but to their credit, they are going down swinging.
SIX! Rashid unleashes! He got all of that one, deep into the crowd over square leg. Fabulous shot.
SIX MORE! Back to back maximums from Rashid Khan! This one over long off, which is even more impressive given it's the long boundary.
They only need 33 from the last two overs. It's possible.
By Dean Bilton
17th over - Pat Cummins bowling again
Darwish takes two from the first ball and one from the second, both with slaps out through the off side.
Only 22 balls to come, and 169 is not currently looking like a viable topic. But the issue of net run rate has been settled - Australia will be out of the tournament tomorrow, unless Sri Lanka beat England.
Rashid plays a vertical-bat shot from high outside the off stump to midwicket for one. I have no idea how he's done that or how to accurately describe it.
FOUR! Darwish goes over cover and finds the rope for the first time.
Pat Cummins completes his four overs, 0-22. A great return.
By Dean Bilton
16th over - Kane Richardson back into the attack
His last over went for 17, at which point things were looking a wee bit dicey for Australia. Fair to say things have shifted somewhat since then.
Tight stuff from Richardson, but this game seems to be meandering its way towards an inevitable finish.
Six from the over.
By Dean Bilton
15th over - Hazlewood has three to come
Rashid Khan comes to the crease now.
Rashid is off the mark with a well-run two out to deep cover.
The over ends with a swatted Rashid pull shot for one. That sees Afghanistan to 106, which some have reported as the magic number that they needed to reach to deny Australia the requisite NRR boost.
By Dean Bilton
ANOTHER GONE! Nabi caught on the boundary!
Hazlewood has his second, and Afghanistan are falling in a screaming heap. He chips one to Warner at deep square leg and departs for 1.
By Dean Bilton
15th over - Josh Hazlewood is back
So it looks like Afghanistan will pass whatever mark England were hoping they would, but Australia are back in the box seat to win the game. If that were to play out, the Aussies would need Sri Lanka to beat England tomorrow for them to reach the semi-finals.
A pair of singles to start the over.
By Dean Bilton
14th over - Zampa has two to come
Darwish Rasooli is the new man in, and he drives smartly through the covers for two.
Finally that over of carnage has come to an end. Three wickets and two runs, and the game has completely changed again in 12 balls.
By Dean Bilton
OUT! Najib holes out to Maxwell at long off!
Goodness me, things are moving quickly at Adelaide Oval. Najib looked to carry on the aggression, but instead gave Maxwell the simplest catch of his tournament at long off. Three wickets for zero runs in this over so far.
By Dean Bilton
14th over - Four to come for Zampa
Two wickets from the first two balls of the over. Najib Zadran on strike, Mohammad Nabi at the other end.
By Dean Bilton
OUT! Ibrahim goes the very next ball!
Just like that, both members of the partnership are gone and Afghanistan's hopes have taken a massive hit! He looked for the paddle sweep but found a top edge, handing Marsh a simple catch at short fine leg.
Funny how quick things can change in T20 cricket.
By Dean Bilton
OUT! Gulbadin is run out! Fabulous from Maxwell!
Could that be a telling blow? Simply sensational from Maxwell, who saves some runs and takes a critical wicket at the same time.
By Dean Bilton
14th over - Zampa to bowl his final over
They might fancy a piece of the spinner here. It's probably the last look at spin they'll get tonight.
Ibrahim down the ground, and they're looking for two...
RUN OUT! Surely! Maxwell has thrown the stumps down from the boundary! Gulbadin will surely be out!