The Football Ferns are through to the semi-finals of the Algarve Cup, after a nervous penalty-shootout win over Belgium in Portugal on Thursday (NZ time).
New Zealand led 1-0 for most of the match, but a 90th-minute goal to Belgium sent the match into a shootout, which the Ferns won 7-6 at Estádio Municipal Bela Vista.
The result, in the first round of the tournament, ends a six-match losing streak for Tom Sermanni's side, who last won against England in a World Cup warm-up fixture last June.
The Ferns will face Italy for a spot in the final on Sunday.
Belgium started the better of the two sides, but the Ferns opened the scoring, when Olivia Chance chipped Belgium goalkeeper Nicky Evrard to score her first career goal in the 37th minute.
Chance's goal gave New Zealand a 1-0 lead at the break.
The Ferns looked set to hold onto their lead, but momentum swung when New Zealand defender Claudia Bunge was sent off for two yellow-card offences in quick succession.
Despite being a player down, the Ferns continued to attack and experienced striker Hannah Wilkinson then missed a chance to put the result beyond doubt, when her strike hit the post.
With the clock winding down, Chloe Velde then scored for Belgium to send the match into penalties.
Katie Bowen, Sarah Gregorius, Rebekah Stott, Rosie White and Meikayla Moore all scored from the spot to send the shootout into sudden death, with all of Belgium's attempts beating Ferns 'keeper Erin Nayler.
New Zealand defender CJ Bott had the first chance to win the game for the Ferns, after Laura Deloose hit the post for Belgium, but Evrard saved her attempt.
Laura De Neve and Annalie Longo both scored for New Zealand, before Nayler saved Sarah Wijnants' attempt.
Midfielder Daisy Cleverley then beat Evrard to secure victory for the Ferns.
The match marked the return of Moore, who hadn't played in nine months, due to a Achilles tendon injury sustained before last year's World Cup.
The match was also Gregorius' 100th - and final - match for New Zealand, with the forward annoucing her retirement after the match.
"Time to [re-] retire and with no take-backs this time. What a incredible ride it’s been - with tonight’s game fitting into that quite nicely," she posted on social media.
The Algarve Cup is an annual invitational football tournament, hosted by the Portuguese Football Federation.
New Zealand previously competed in the tournament in 2016, where they finished fourth.
Defending Algarve Cup champions Norway will face Germany in the other semi-final.