The win levelled the two-match series at 1-1, as New Zealand managed to defend a modest target in thrilling fashion.
Tristan Stubbs' unbeaten 47 propelled South Africa to a three-wicket win over India in the second of their three T20Is.