A record-breaking century from Ross Taylor steered New Zealand to a gripping six-run win over South Africa in the second one-day international in Christchurch on Wednesday.
Taylor scored an unbeaten 102 as New Zealand batted first and set a target of 290, with South Africa coming close thanks to a late 26-ball half-century from Dwaine Pretorius.
The result snaps a 12-match ODI winning streak for South Africa and levels the five-match series in New Zealand at 1-1.
Taylor completed his ton in dramatic fashion with a boundary off the last ball of the innings, claiming a New Zealand record of 17 ODI centuries.
The 32-year-old, who had shared the record of 16 with Nathan Astle, has been in a rich vein of form since returning from eye surgery in early January.
"Nath was one of my idols growing up... so it's a little bit embarrassing from that point of view but records are there to be broken," he said.
Taylor, who also became only the fourth New Zealander to score 6,000 ODI runs, received solid support from captain Kane Williamson and all-rounder Jimmy Neesham.
Neesham scored an unbeaten 71, while Williamson notched 69 -- a return to form for a batting line-up which has been over-reliant on tail-end contributions recently.
However, there were also concerns for New Zealand, with opener Tom Latham and Neil Broom only scoring two runs apiece.
Latham, in particular, will face intense pressure to keep his place after ducks in his previous two ODIs.
Several South African batsmen -- including Quinton de Kock (57) and AB de Villiers (45) -- made good starts but were unable to go on and anchor the innings.
The tourists looked to have no chance at 214 for eight but Pretorius gave the Black Caps some nervous moments, helped by misfields and poor bowling at the death.
He was dropped on 15 and made the most of the reprieve, smashing two sixes and four fours to keep the result in the balance.
When he was finally bowled by Trent Boult with one over to go South Africa needed 15 off six balls but it proved too much for Andile Phehlukwayo (29) who could manage only two boundaries off the final two deliveries.
South Africa captain de Villiers blamed "sloppy" batting for the defeat.
"We've got a few things to work on," he said. "There were quite a few soft dismissals, including mine, and not enough good partnerships.
"The partnerships that we did get going we couldn't extend, you have to do that if you want to win games of cricket."
The third one-dayer will be played in Wellington on Saturday.