A late Dan Biggar penalty ensured Wales ended their 13-match losing streak against Australia in a dramatic finale at the Principality Stadium.
There was little to choose between the two sides as Leigh Halfpenny and Bernard Foley traded penalties in a tight first half which ended 3-3.
Halfpenny added a further three-pointer after the break before Matt To’omua responded to level again, but the Wallabies had no time for a reply after Biggar kicked the winning penalty.
Australia sent out an early warning to Wales in the opening minute when Israel Folau and Will Genia combined down the blindside before George North intervened to knock the ball into touch.
Michael Hooper was next to test the hosts’ defence, stretching them out wide before sending Samu Kerevi clear but fly-half Gareth Anscombe was on hand to deny the Wallaby centre.
A turnover from Justin Tipuric – man of the match against Scotland last week – saw Wales enjoy their first sustained spell of possession and they soon had the first points of the match.
Having missed his opening penalty moments earlier, Halfpenny made no mistake with his next effort on 21 minutes after Australia were penalised under pressure at the scrum.
It did not take the Wallabies long to hit back following a sustained spell of pressure, which included a 16-phase move that was halted when Adam Coleman spilled the ball.
His error provided only the briefest of reprieves for Wales as a no arms tackle by Dan Lydiate gave Australia their first shot at the posts – a chance Foley nailed to level the scores.
The tourists came close to scoring the game’s first try just before the break, lurking just in front of the posts, but Tipuric earned his side another turnover penalty to ease the pressure.
Both defences remained on top for the rest of the first half as the score remained 3-3 at the break, after Halfpenny missed another penalty chance on the cusp of half-time.
The full-back looked to make amends for the miss soon after the restart, making a break after a great high take – but David Pocock was on hand to win his side a penalty.
Australia then turned down a certain three points, instead opting for the corner, after Wales collapsed a driving maul, but the decision did not pay off as they failed to convert.
It was déjà vu minutes later when Foley kicked a penalty 5m short of the Welsh tryline, but a poor lineout allowed the hosts to relive the danger as Jonathan Davies hacked the ball clear.
The tension continued to build as the game entered the final 15 minutes and it was Wales who landed the next blow, with Halfpenny adding another three points.
Wales’ lead lasted only a few minutes as To’omua responded with Australia’s second penalty to level the game once again on 74 minutes.
But with three minutes left on the clock, Wales stole possession in the Wallabies’ 22 and Ned Hanigan was penalised for not rolling away at the breakdown.
With Halfpenny off for a HIA, the responsibility fell on Biggar and the fly-half delivered under intense pressure to secure a memorable victory for Wales at the death.
Justin Tipuric (Wales flanker) said: “It’s obviously a big result for us, we’ve been wanting this for a while and we’ll take any win any way it comes.
“It is nice to finally get a win over Australia and I think that’s now seven wins in a row so it’s nice to build momentum. We pride ourselves on our defence and that is what won us the game.”
Michael Hooper (Australia captain) said: “That hurts as our preparation has been really solid this week and I thought our defence was great, we repelled a lot of what the Welsh threw at us.
“Credit to them they stuck at it. You could see how happy they were to get on top of us, it was a real grudge match, a real Test match and congratulations to them for the win.”
Player Watch: Justin Tipuric
For the second week in a row, Justin Tipuric was the deserved man of the match as he caused havoc at the breakdown and proved a constant thorn in Australia’s side.
Dan Biggar took centre stage as he came off the bench to nervelessly deliver the match-winning moment with three minutes left on the clock after Leigh Halfpenny was forced off.
– The victory for Wales was their first over Australia since 2008 – Warren Gatland’s side extended their winning run to seven consecutive games – Justin Tipuric and Ross Moriarty both made 16 tackles in a massive defensive effort