Wales were condemned to an autumn series whitewash after Australia fly-half Kurtley Beale broke their hearts at the Millennium Stadium.
- Related Content
Beale scored a try with 26 seconds left to deny Wales victory and drop them outside the world's top eight teams ahead of the 2015 Rugby World Cup pool draw in London on Monday.
Leigh Halfpenny looked as though he had done enough in terms of claiming a priceless victory with four penalties, but Beale, who had earlier claimed a penalty hat-trick had other ideas.
Wales have now lost seven Tests in succession, eight on the bounce to Australia and they will be a tier three nation for the World Cup draw, potentially meaning a group of punishing proportions.
Wales produced their best display of the autumn in head coach Warren Gatland's last game at the helm before he begins full-time preparations for heading up next summer's British and Irish Lions tour to Australia.
And his players almost did enough to give him a quality send-off, but they could not keep Beale quiet during the frantic closing stages, with the game ending when Halfpenny was carried away on a stretcher before Wallabies skipper Nathan Sharpe attempted the final conversion in his last game before retirement.
Several Wales players stepped up to the mark, including Halfpenny, centre Jamie Roberts and fly-half Rhys Priestland, who had his best game of a calendar year that had mostly seen him struggle for confidence.
The overwhelming majority of a 58,000 crowd were not bothered by what had been a tryless affair until the final seconds.
It was all about Wales rediscovering a winning formula, and they went agonisingly close to achieving it.
Wales, under interim head coach Rob Howley's direction, will begin their RBS 6 Nations title defence against Ireland in Cardiff on February 2, and it is a game that they can now at least look forward to with confidence, despite the Wallabies loss.
Wales suffered a second-row injury blow inside two minutes against New Zealand last weekend when Bradley Davies was floored off the ball by All Blacks hooker Andrew Hore. This time around, it was barely three minutes before a lock needed treatment.
Luke Charteris took a hefty blow to his shoulder and head while attempting a tackle on Wallabies flanker Scott Higginbotham, and Ryan Jones took over from the Perpignan forward, who was helped off before returning shortly afterwards.
Beale, meanwhile, missed an early penalty chance for the visitors, and it took Wales almost eight minutes to relieve pressure in or around their own 22.
Wales finally stirred when they ambitiously ran the ball from behind their own line and wing Alex Cuthbert sprinted 60 metres before he was tackled into touch by Wallabies full-back Berrick Barnes.
Even though their sense of adventure had been suppressed by Barnes' quality defensive work, Wales at least looked in the mood to produce some quality attacking rugby.
Beale, though, booted a 50-metre penalty to open the scoring, before Halfpenny struck an equalising kick from two metres inside his own half.
It meant ended the opening quarter ended 3-3, but Wales continued to increase the tempo following an uncertain beginning, and Halfpenny's second successful penalty rewarded rewarded impressive work by a pumped-up pack.
Halfpenny, comfortably Wales' most consistent player of the autumn, then ran aggressively from deep to set up a scoring chance.
His kick into space bounced behind Australia's line, but Wallabies number eight Wycliff Palu just nudged out Wales captain Sam Warburton in a desperate scramble for the ball.
Australia responded to that hairline escape when another long-range Beale penalty tied it up at 6-6 as both sides continued sparring away at each other in search of an opening.
Palu was then fortunate to escape a yellow card after a high tackle on Wales hooker Matthew Rees, and the home side continued to look most likely in terms of breaking the try deadlock.
But a third Beale penalty put Australia three points in front after Roberts was punished for not rolling away in the tackle, and Halfpenny missed a penalty with the half's final kick.
Charteris failed to appear for the second period, with Jones going on as a permanent replacement and Aaron Shingler moving up to second-row duties that he filled so impressively last weekend.
Australia looked to move possession wide early in the second period, and Wales were stretched at times. They also needed Lady Luck on their side when Barnes ignored a three-man attacking overlap by kicking instead.
A third Halfpenny strike tied the game up again after 54 minutes, and then he restored Wales' advantage six minutes later to set up an intriguing finale.
From then on, it was a case of Wales attempting to close down the game and give Gatland only his second victory against Australia, New Zealand or South Africa in 21 Tests since he took charge five years ago.
But it was not to be as Australia celebrated and Wales once again were left wondering what might have been.