Australia will face West Indies in the under-19 Cricket World Cup fifth-place playoff after they defeated Afghanistan by four wickets in South Africa.
Tanveer Sangha starred for the Aussies with bat and ball, taking 4-41 with his legspin as Afghanistan were restricted to 7-191 batting first at North West University Oval.
Australia lost two early wickets and survived a a middle-order collapse of 4-23 to chase down the total with just one ball to spare.
Sangha (46 not out from 40 balls) combined with Patrick Rowe (22 not out) for an unbeaten 72-run, seventh wicket stand to steer Australia home.
Sangha finished the match with a six on the penultimate delivery.
Opener Sam Fanning top scored for Australia with a patient 62 off 107 balls.
The Aussies will play West Indies, whom they lost to in the group stage, at Willowmoore Park in Benoni on Friday.