Cardiff - A last-gasp try by Kurtley Beale gave Australia a thrilling 14-12 victory over Wales on Saturday which condemned the Welsh to a seventh successive defeat and left them facing a daunting Rugby World Cup challenge.
Flyhalf Beale dived over in the corner with 20 seconds of time left under a closed roof at the Millennium Stadium.
Wales, needing a draw or a win to stay in the world's top eight after a miserable run of form, now find themselves cast into the third band of seeds for Monday's 2015 World Cup pool draw.
Beale also kicked three penalties for the Australians, who return home after tour wins over Wales, Italy and England, with their only blemish a heavy opening defeat by France. Leigh Halfpenny, who needed lengthy treatment which delayed the end of the game, landed three penalties for Wales.
The Welsh, forced to name another patched-up side after a succession of injuries in home defeats to Argentina, Samoa and New Zealand, did not lack for ambition with Warren Gatland's men showing the determination to continue the momentum from a bright second-half showing against the All Blacks last weekend, despite a 33-10 defeat.
They were initially on the backfoot as the Wallabies twice wasted promising early openings. Adam Ashley-Cooper was penalised for a forward pass having broken through the first line before some resilient Welsh defending forced a turnover with the opponents camped on their tryline.
Pushed back, Wales countered with a scintillating break from wing Alex Cuthbert who took an attack that started from behind his own line all the way to Australia's 22 before being forced into touch.
Halfpenny's pace then set up another chance, bursting deep into Australia's half before his kick forward set up a race to the line. Fortunately for the Wallabies, Wycliff Palu just got his hand down first despite the attentions of Sam Warburton and Toby Faletau.
Halfpenny's penalties put Wales ahead 12-9 up after an hour, but, with the Wallabies seemingly running out of gas and ideas, they conjured one final piece of magic from a gruelling season as Beale burst clear from a Dave Dennis pass to break Welsh hearts.
Scorers:
Wales:
Penalties: Leigh Halfpenny (4).
Australia:
Try: Kurtley Beale.
Penalties: Beale (3).
Teams:
Wales:
15 Leigh Halfpenny, 14 Alex Cuthbert, 13 Jonathan Davies, 12 Jamie Roberts, 11 Liam Williams, 10 Rhys Priestland, 9 Mike Phillips, 8 Toby Faletau, 7 Sam Warburton (captain), 6 Aaron Shingler, 5 Luke Charteris, 4 Lou Reed, 3 Scott Andrews, 2 Matthew Rees, 1 Gethin Jenkins
Substitutes: 16 Ken Owens, 17 Ryan Bevington, 18 Samson Lee, 19 Ryan Jones, 20 Justin Tipuric, 21 Tavis Knoyle, 22 Dan Biggar, 23 Scott Williams
Australia:
15 Berrick Barnes, 14 Nick Cummins, 13 Adam Ashley-Cooper, 12 Ben Tapuai, 11 Drew Mitchell, 10 Kurtley Beale, 9 Nick Phipps, 8 Wycliff Palu, 7 David Pocock, 6 Scott Higginbotham, 5 Nathan Sharpe (captain), 4 Kane Douglas, 3 Ben Alexander, 2 Tatafu Polota Nau, 1 Benn Robinson
Substitutes: 16 Stephen Moore, 17 James Slipper, 18 Sekope Kepu, 19 Dave Dennis, 20 Michael Hooper, 21 Brendan McKibbin, 22 Mike Harris, 23 Digby Ioane
Referee: Wayne Barnes (ENG)