A stoppage-time winner by Shane Smeltz spared New Zealand's blushes as it claimed third place in the Oceania Nations Cup tournament by beating gallant host Solomon Islands 4-3.
The sides had looked to be heading for a penalty shoot-out in Honiara after the Solomons staged a remarkable second-half comeback from 3-0 down.
Benjamin Totori grabbed two of the home side's goals, his superb second effort in the 88th minute wiping out Chris Wood's first-half hat-trick.
But in the fourth minute of added time, Smeltz beat the offside trap and coolly lobbed goalkeeper Shadrack Ramoni.
Coach Ricki Herbert said the match was representative of New Zealand's campaign over the past week.
"It's been tough and tight and the best thing we could do today was win," he said.
"The guys took it right to the wire but we got home."
Herbert said the All Whites were still hurting from their 2-0 semi-final defeat to New Caledonia, a result that killed their hopes of another lucrative appearance in the Confederations Cup, which will be in Brazil next year.
"We're extremely disappointed as we've let so many people down," he said.
"I guess in some small way, we've responded a little bit today."
Herbert reacted to the loss to New Caledonia by putting out a youthful line-up for the third place play-off.
New Zealand looked to be cruising when Wood struck in the 11th and 25th minute with headers and then volleyed home on the half-hour.
But Solomon Islands, which had held New Zealand to a 1-1 draw in the group stage, got on the board in the 48th minute when young winger Himson Teleda found the net from the edge of the box.
Six minutes later, Totori, a former YoungHeart Manawatu and Waitakere United striker, saw his shot somehow go through keeper Jake Gleeson's legs and into the goal.
His second came when he fired home from an acute angle, before Smeltz made his dramatic late intervention.