New Zealand will meet Australia in the World Cup semi-finals after surviving an almighty scare against Fiji in Hull.
The Bati pushed the Kiwis all the way in arguably the match of the tournament before ultimately being edged 24-18 in the final minutes.
Fiji were ahead for 63 minutes, but a Jordan Rapana penalty goal and try in the corner capped off an incredible comeback to seal a semi-final spot.
In a thrilling contest, the Bati were left heartbroken after giving it everything but walking away with nothing.
Fiji started strongly and took the lead in the 11th minute through Maika Sivo.
Seven minutes later, there in again, this time through Kevin Naiqama.
New Zealand hit back in the 26th minute when Ronaldo Mulitano crossed.
There were a number of errors from the Kiwis, who were being thwarted by some brilliant Bati defence.
The game was delicately poised at 12-4 at half-time.
In the second half, Naiqama crossed against to make it 18-4.
But the Kiwis finally came alive when some soft defence allowed Brenton Nikora to score.
In the 54th minute, Mulitano looked to have got over the line for his second try, but a great tackle from Brandon Wakeham stopped him.
The Fijians were hanging in there, and then Joey Manu touched down off Mulitano’s offload to tie it up at 18-18.
Then in the 70th minute, a turning point came when the Bati were controversially penalised for a strip on Manu.
Rapana nailed his kick to put his team 20-18 ahead.
The Bati searched for a late winner, but the Kiwi winger touched down in the final minute to seal a dramatic victory for New Zealand.
New Zealand 24
Tries: R. Mulitalo (26), B. Nikora (49), J. Manu (63), J. Rapana (79)
Goals: J. Rapana (28), J. Rapana (50), J. Rapana (65), J. Rapana (72)
Tries: M. Sivo (12), K. Naiqama (18), K. Naiqama (44)
Goals: B. Wakeham (13), B. Wakeham (20), B. Wakeham (45)