The Tall Blacks have beaten Turkey 102-101 to complete their basketball World Cup campaign in China with a three win-two loss record.
Isaac Fotu scored the final two baskets as the lead changed three times in the final minute.
Centre Rob Loe top scored for New Zealand with 17 points.
Coach Paul Henare says the fight his team showed was exceptional.
"A little bit lost for words just because that result, in the greater scheme of things, what that says about our programme and what we've done over the course of this tournament."
The win secures the side a position at one of next year's four Olympic qualifying tournaments.