The All Blacks Sevens have claimed bronze at the Los Angeles leg of the world series, beating Australia 21-19 on Monday morning (NZ time).
New Zealand were relegated to play in the bronze final, after being outclassed 17-0 by South Africa in the semis.
But they finished the tournament on a high with a hard-fought victory against their trans-Tasman rivals.
New Zealand raced out to an early lead, with Etene Nanai-Seturo and Akuila Rokolisoa scoring.
Momentum quickly shifted, as Caleb Clarke was sin-binned for a late tackle.
Australia made the most of the one-man advantage, scoring two tries through Lachie Miller and Maurice Longbottom to draw level 14-14 at the break.
Midway through the second half, Miller was also yellow-carded and New Zealand made Australia pay, as co-captain Tim Mikkelson put his side back in front.
But the Aussies refused to budge, with Nick Malouf crossing for Australia's third try. Crucially, Longbottom missed the conversion that would have locked the scores at 21-21.
Australia pressed for a winner, but Sione Molia won a crucial turnover to help New Zealand secure victory.
The bronze medal was enough to see the All Blacks Sevens stay above South Africa in the world series standings.
New Zealand were never in the semi against the Blitzboks, with handling errors and passing letting them down badly.
Angelo Davids scored a brace of tries, with Wener Kok also scoring for South Africa in the win.
Earlier in the day, New Zealand beat France 29-14 in the quarter-finals.
Just 16 seconds into their quarter-final, the All Blacks Sevens were down a man, as Ngarohi McGarvey-Black was sin-binned for a high tackle.
France made New Zealand pay, with Paulin Riva scoring the game's opening try.
But as New Zealand returned to full strength, they stamped their authority, with tries to Joe Ravouvou and Molia giving them a 12-7 halftime lead.
Second-half tries to Ravouvou, McGarvey-Black and Clarke put the result beyond doubt, before France scored a late consolation through Jean-Teiva Jacquelin.
South Africa looked set to crash out of their quarter-final against the two-time defending champions United States, overcoming a 10-0 halftime deficit to win 12-10, thanks to a last-minute try to JC Pretorius.
On Sunday, the All Blacks Sevens topped their pool, recording wins over Wales (42-7), Spain (21-7) and England (21-17).
The next tournament takes place next weekend at BC Place in Vancouver, Canada.