Australia were 202 runs from victory with six wickets in hand at the end of day three of the second Test in Christchurch on Sunday after New Zealand grabbed the momentum with some late bowling fireworks.
Australia skipper Pat Cummins took 4-62 as the visitors, already 1-0 up in the two-match series after last week's victory in Wellington, dismissed the Blacks Caps for 372 in their second innings after tea.
Home seamers Matt Henry and debutant Ben Sears, however, went to work in a thrilling final 90 minutes of play and took two wickets apiece to send back Steve Smith, Marnus Labuschagne, Usman Khawaja and Cameron Green cheaply.
The Australians still managed to score at a fair pace and will resume on Monday on 77-4 with Mitch Marsh, who was 27 not out, and Travis Head, unbeaten on 17, looking to cut deeper into their 279-run victory target.
The highest successful fourth-innings run chase in a test at Hagley Oval was the 285 New Zealand scored to beat Sri Lanka with a run on the final ball of a dramatic match last year.
"If you'd said at the start of the day that we'd have them four down still 200 runs behind, I think we would have taken that," said Black Caps opener Tom Latham.
"The guys showed a lot of fight with the bat and we built a couple of key partnerships, which was great, and the guys did a great job tonight with the ball."
Several Black Caps batters made good starts in their second innings but none was able to convert into the sort of three-figure innings that would have taken the game away from the Australians.
Cummins was the first to strike in the morning, even if he needed a review to dislodge Latham caught behind for 73 with only 21 runs added to New Zealand's overnight tally of 134-2.
Rachin Ravindra and Daryl Mitchell then put on 123 for the fourth wicket before an outside edge off a Josh Hazlewood delivery did for the latter with 58 runs to his name with New Zealand's lead at 184.
Cummins, as he had to dismiss dangerman Kane Williamson in the last hour on day two, struck with the first ball of his next spell to remove Ravindra for 82.
Green then got in on the act with the first ball of his new spell by having Tom Blundell caught by Labuschagne at cover for nine to leave New Zealand on 296-6.
Labuschagne dropped Scott Kuggeleijn on two and the seamer made the Australians pay by putting on 53 runs for the seventh wicket with Glenn Phillips.
Phillips departed for 16, bowled by Nathan Lyon with the first ball of his new spell, but Kuggeleijn made 44 before the off spinner finally manage to winkle him out.The last three wickets fell for the addition of only one run, and New Zealand, chasing a first home win over the neighbours in 31 years, will perhaps rue not having set Australia a target in excess of 300 runs.