Australia ended a run of six Test defeats by coming from behind to beat South Africa 23-17 at Suncorp Stadium in Brisbane in Round 3 of the Rugby Championship.
Tries from Warren Whiteley and Johan Goosen handed South Africa a double-digit lead, but the boot of Bernard Foley and an Adam Coleman try meant that South Africa only led by a point at half-time, up 14-13.
A Foley penalty then put the Wallabies ahead for the first time before his solo try edged Australia further into the lead.
And despite a Morné Steyn penalty putting the Springboks within a converted try of the win, they couldn't find the breakthrough in the closing stages, to make it back-to-back losses for Allister Coetzee's side.
Considering the two teams' form prior to Brisbane this fixture was unsurprisingly scrappy, with handling errors aplenty.
Questions regarding what South Africa are trying to achieve tactically on attack will continue to persist as long as they only score tries off turnovers, as was the case here in Brisbane.
And while the Wallabies attack at times showed plenty of rhythm, that also disappeared for large swathes of the match. Both outfits are truthfully some way off their best, and will be underdogs for their respective fixtures against Argentina and New Zealand next weekend.
Some credit must go to South Africa for the way they made the most of Wallaby mistakes for their two tries in the first half, pouncing on the errors and turning them into points.
A Jantjies break produced the first score, Whiteley finishing off a sustained attack by going over from metres out after great runs in the build-up from Faf de Klerk and Oupa Mohoje.
Foley cut the lead to four with a first penalty before the Wallabies' intent in attack, especially from Quade Cooper with an incisive break at the touchline, came to nothing and turned into a disaster.
Adriaan Strauss produced an athletic interception and from there the Springboks broke, Goosen winning the race to Jantjies' chip ahead to score under the posts, making it 14-3 with the conversion.
That scoreline felt harsh on the Wallabies and they eventually crossed themselves through lock Coleman, finishing in the corner from a looping Foley pass as Bryan Habana failed to haul in a possible interception. Foley's touchline conversion made it 10-14.
And another penalty from the Wallaby number ten cut the gap to just a point at the break, with Jantjies pushing an effort of his own to the right to leave South Africa ahead 14-13 at half-time.
Not long after Eben Etzebeth had run back onto the field for the second half he was soon trudging off it again, yellow carded for cynical play in his 50th Test after a break from Samu Kerevi. Foley converted the resulting penalty to put Australia ahead for the first time at 16-14.
A prolonged TMO referral then eventually denied Kerevi a finish in the corner, the big Reds centre's knee touching the whitewash milliseconds before he appeared to have done enough to ground the ball despite the tackle of Goosen.
Finely poised for over 20 minutes after that, with South Africa riding out the sin-bin period, both sides were guilty of squandering chances either by failing to make the most of overlaps or through turnovers.
Foley stopped the rot. Shaping to pass wide in the middle of the field before cutting in-between Jantjies and Pieter-Steph du Toit to score by the posts for a sharp finish.
Steyn cut the gap to six with a penalty to set up an intriguing final few minutes, but South Africa couldn't find the score required, giving Australia a long-awaited victory and their first of the year.
Tries: Coleman, Foley
Cons: Foley 2
Pens: Foley 3
For South Africa:
Tries: Whiteley, Goosen
Cons: Jantjies 2
Yellow Card: Etzebeth
Australia: 15 Israel Folau, 14 Dane Haylett-Petty, 13 Samu Kerevi, 12 Bernard Foley, 11 Reece Hodge, 10 Quade Cooper, 9 Will Genia, 8 David Pocock, 7 Michael Hooper, 6 Dean Mumm, 5 Adam Coleman, 4 Kane Douglas, 3 Sekope Kepu, 2 Stephen Moore (c), 1 Scott Sio
Replacements: 16 Tatafu Polota-Nau, 17 James Slipper, 18 Allan Alaalatoa, 19 Rory Arnold, 20 Sean McMahon, 21 Nick Phipps, 22 Tevita Kuridrani, 23 Drew Mitchell
South Africa: 15 Johan Goosen, 14 Bryan Habana, 13 Jesse Kriel, 12 Juan de Jongh, 11 Francois Hougaard, 10 Elton Jantjies, 9 Faf de Klerk, 8 Warren Whiteley, 7 Oupa Mohoje, 6 Francois Louw, 5 Lood de Jager, 4 Eben Etzebeth, 3 Lourens Adriaanse, 2 Adriaan Strauss, 1 Tendai Mtawarira
Replacements: 16 Bongi Mbonambi 17 Trevor Nyakane, 18 Steven Kitshoff, 19 Franco Mostert, 20 Pieter-Steph du Toit, 21 Jaco Kriel, 22 Morne Steyn, 23 Lionel Mapoe
Referee: Nigel Owens
Assistant Referees: Wayne Barnes , Pascal Gauzère
TMO: Ben Skeen