Australia scored first in the "dead rubber", perhaps a surprise after a last-start shock loss to Argentina and a week of drama surrounding Kurtley Beale. Nick Phipps dived over after lead-up work from Christian Leali'ifano and Israel Folau, and Bernard Foley converted.

The All Blacks wasted no time in replying. Conrad Smith claimed the ball from the kick-off and winger Cory Jane scored in the corner. Beauden Barrett converted.

When Richie McCaw was penalised for not rolling away, Foley provided his side with a 10-7 lead, before New Zealand's Dane Coles showed speed to get his side in front 12-10.

Barrett missed the relatively easy conversion attempt and not long after Australia reclaimed the lead through Foley, who crashed over from the back of a ruck.

Foley missed the tough conversion attempt, but his side boasted a 15-12 lead at half-time.

When Phipps found Adam Ashley-Cooper in space, the 100-gamer crossed and Foley converted for a 22-12 margin.

Barrett reduced the deficit with a penalty from 40m, but Foley made the most of an attempt minutes later for a 25-15 score line.

From the re-start, Rob Simmons went up for the ball but was brought down heavily by Patrick Tuipulotu, who was shown a yellow card.

Still, the New Zealanders en-sured a tense finish when Aaron Smith stepped around former Wallabies skipper James Horwill to score and Barrett converted to close the gap to 25-22 with 10 minutes remaining.

The Wallabies snared some breathing room when Nic White converted a penalty following a McCaw indiscretion.

But New Zealand has made a habit of clutching victory at the death, especially against Australia, and it did so again when Fekitoa crossed with three seconds remaining.

Former Noosa player Josh Mann-Rae, 33, replaced hooker Saia Fainga'a in the final seven minutes of the clash to earn his second cap, after playing against Argentina last month.