Brisbane - Springbok coach Allister Coetzee says his side's discipline let them down in Saturday's Rugby Championship loss to Australia.
Australia edged South Africa 23-17 to snap a six-game losing streak and ease pressure on coach Michael Cheika.
After being down 14-13 at half-time, the Australians took control of the second period and were 23-14 up within the last 20 minutes thanks to a Bernard Foley try.
The Springboks fought back to within six points, but the hosts survived to give the embattled Cheika some breathing space with their first win of the year.
South African coach Coetzee said the Springboks had no one to blame but themselves after squandering an early lead.
"I was really pleased with the start," he said.
"But I'm starting to sound like a cracked record - our discipline let us down, which let Australia back into the game.
"They got territory from it and put us under pressure."
After losing the World Cup final to New Zealand last October, Australia have suffered three defeats to England and two big losses to the rampant All Blacks this year.
"It's always nice to have a win," an obviously relieved Cheika said.
Cheika admitted the Wallabies had been desperate to end their run of losses, which led to some poor decision making in the closing stages.
"Towards the end of the game we had opportunities to hit them on the counter, but there was just that anxiety of being in front and wanting to stay in front at all costs," he said.
Australia had only lost seven matches in a row once before - a sequence that cost Eddie Jones his job as Wallabies coach - and they were desperate to avoid equalling the record.
But they got off to the worst possible start when the towering Eben Etzebeth made a break down the right wing in the third minute and found flanker Teboho Mohoje in support.
Wallabies scrum-half Will Genia brought Mohoje down in a try-saving tackle close to the line, but from the ensuing ruck Genia's opposite number Faf de Klerk slipped a short ball to number eight Warren Whiteley, who crashed over.
Elton Jantjies' conversion made it 7-0 after just three minutes.
A Foley penalty reduced the gap to 7-3 in the 11th minute, but he undid his good work when he threw a no-look pass with the Wallabies deep in attack only for Springbok captain Adriaan Strauss to intercept.
Strauss unloaded to Jantjies, who drew the last Wallaby defender and kicked ahead for fullback Johan Goosen to score under the posts.
The Wallabies were shellshocked at 14-3 down but they began to hold onto the ball and exert some pressure on the South Africans.
"The boys responded well, we didn't panic," Wallabies captain Stephen Moore said. "We had plenty of opportunities to make ground and get points."
With Genia dictating play superbly behind an aggressive pack, they were back in the contest when giant lock Adam Coleman crashed over in the corner after the Australians opted for a line-out instead of a kickable penalty.
Foley converted from the sideline to make it 14-10 to the Springboks, before his second penalty five minutes from half-time narrowed the gap to just one point.
The home side carried their momentum into the second half and they hit the front with a third Foley penalty two minutes after the restart, when Etzebeth was given a yellow card for slowing the ball down after a storming break from outside centre Samu Kerevi.
Despite dominating for much of the second half, it took until the 61st minute for the Wallabies to finally crack the determined Springbok defence when Foley crossed next to the posts after 18 phases of attack on the South African line.
The Springboks, who lost to Argentina in their last outing, threw everything at the Wallabies and Morne Steyn's penalty got them to within a converted try, but the Wallabies weren't to be denied.