Australia are in command of the first Test against New Zealand, despite collapsing in the final session on day three at Perth Stadium, after Marnus Labuschagne's purple patch with the bat continued.
Eleven wickets fell at Perth Stadium on Saturday, the excellent Mitchell Starc (5-52) claiming his 13th five-wicket Test haul as the tourists were dismissed for 166 in the first session - Ross Taylor making 80.
Australia were cruising with Labuschagne (50) and Joe Burns (53) at the crease, but slumped from 131-1 to 167-6 by the close, Tim Southee taking 4-63 and Neil Wagner 2-40.
Tim Paine's side, without Josh Hazlewood for the rest of the match due to a hamstring injury, remain in complete control despite that late flurry of wickets, leading by a mammoth 417 runs.
The Black Caps had resumed in deep trouble on 109-5 and they were soon six down when BJ Watling chopped on to a sharp delivery from Pat Cummins.
Taylor added only 14 runs to his overnight total before edging Nathan Lyon to Steve Smith at first slip - and Colin de Grandhomme was caught by the former Australia skipper on 23 when he contentiously became Starc's fifth victim.
Third umpire Marais Erasmus upheld Aleem Dar's on-field decision to give De Grandhomme out despite it not being clear if the ball had struck the all-rounder on the glove.
Labuschagne got in on the act by bowling Mitchell Santner through the gate with a classic leg break and Lyon ended the innings just before lunch by getting rid of Southee.
David Warner passed 7,000 Test runs – taking him above the great Don Bradman on the all-time list in the process - before falling for 19, the left-hander picking out substitute fielder Tom Blundell with an attempted pull when a short ball from Southee got big on him.
Burns was dropped by De Grandhomme on 24 and played with more fluency after a watchful start to his knock, with the in-form Labuschagne - who scored a third consecutive Test century in the first innings - in great touch at the other end.
They pressed on after taking tea at 75-1, reaching half-centuries in quick succession, while umpire Dar - standing in a record 129th Test - needed treatment on his knee after a collision with Santner.
Labuschagne was looking ominous until he pulled Wagner straight to Santner at midwicket, while Burns followed after fending a short ball from Southee to Henry Nicholls in the gully.
Smith fell to Wagner for only 14 before a fired-up Southee removed Travis Head and Tim Paine - who failed to score – though Australia are still firmly on top despite the dramatic finish to proceedings.