Brendon McCullum drew the curtain on his illustrious batting career as a typically pugnacious but short-lived innings.

On an emotional day when players and fans marked the fifth anniversary of the devastating Christchurch earthquake, the captain’s departure in his 101st and final Test left New Zealand staring down the barrel.

At the end of the third day New Zealand were 121-4, needing a further 14 to make Australia bat again and with hopes receding of a series-levelling victory.

McCullum arrived for his farewell innings at 72-3 but after 25 off 27 deliveries, the man who hit the fastest ever Test century in the first innings was out.

His second-to-last whack sent Josh Hazlewood for a record-extending 107th six over square leg. But when he danced down the wicket for a repeat performance off the next ball he was caught by David Warner.

After Australian captain Steve Smith ran over to shake McCullum’s hand and acknowledge the New Zealand captain’s contribution to the game, he was gone for the last time.

It had been a memorable Test for McCullum with a rollicking 145 in the first innings, reaching his century in a record 54 balls, when he defied the accepted rules of cricket by lashing out on a seaming wicket.

After that innings he said what mattered most was winning the Test, but that now seems unlikely.

A magic spell from James Pattinson when he ripped through New Zealand’s top order gave Australia a glimpse of victory and a return to the number one world ranking.

Kane Williamson was not out 45 at stumps with Corey Anderson on nine.

The Australians posted a formidable 505 in their first innings for a 135-run lead and New Zealand’s attempt to save the Test and started disastrously when Martin Guptill was caught behind off Pattinson for nought.