Australia 215 for 7 (Head 62, Shamsi 2-42) beat South Africa 212 (Miller 101, Klaasen 47, Starc 3-34, Cummins 3-51) by three wickets
Kolkata: Australia are through to the World Cup final after a tension-filled three-wicket win over South Africa in Kolkata on Thursday.
After bowling South Africa out for 212, Pat Cummins' side made a flying start with Travis Head hitting a quickfire 62 before they were pegged back by the Proteas spinners and slipped to 137-5.
Australia edged closer but lost their seventh wicket with 20 runs still needed and although the pressure continued to build, Cummins and Mitchell Starc kept their cool to complete a hard-fought victory with 16 balls to spare.
The Proteas had been reduced to 24-4 following superb new-ball bursts from Josh Hazlewood and Starc before David Miller rescued the innings with a determined 101 from 116 balls.
But despite a valiant effort in the field, it wasn't enough and Australia advance to face India in Sunday's final in Ahmedabad.
Batting first in overcast conditions was a risk South Africa were willing to take given their previous success with that approach but they were soon in trouble as Starc and Hazlewood tore through the top order.
Starc removed Temba Bavuma in the first over, Quinton de Kock fell to Hazlewood in the sixth and with Australia energised in the field, South Africa had just eight on the board after seven overs and were 18-2 at the end of the powerplay.
When Aiden Markram and Rassie van der Dussen fell in successive overs, it was left to Miller and Heinrich Klaasen to salvage the innings and, either side of a 40-minute rain delay, the pair did just that with a composed 95-run stand.
Klaasen fell for 47 but Miller kept going, reaching his sixth one-day international hundred with his fifth sixth before holing out from the next legal delivery.
Head and David Warner looked like knocking the runs off in a hurry, adding 60 in the first six overs, and even when the latter was bowled by Markram, the runs kept coming for Australia.
South Africa's seamers were taking some punishment and Head, dropped on 40, hit three consecutive boundaries to bring up his half-century.
The introduction of spin changed the game. Keshav Maharaj bowled Head through the gate for 62 and Tabraiz Shamsi accounted for Marnus Labuschagne and Glenn Maxwell to bring the Proteas right back into contention.
Josh Inglis and Steve Smith prevented a collapse but with the finish line in sight for Australia, Coetzee bounced out Smith and then bowled Inglis.
With South Africa refusing to know when they were beaten, Starc and Cummins had to bide their time and more than seven overs went by before the Australia skipper cut Marco Jansen for four to seal the win.