New Zealand 245 for 6 (Williamson 106*, de Grandhomme 60, Morris 3-49) beat South Africa 241 for 6 (Van der Dussen 67, Ferguson 3-59) by four wickets
Birmingham: Kane Williamson produced a masterclass of controlled batting to lead New Zealand to a tense four-wicket victory against South Africa at Edgbaston on Wednesday, realistically killing off the Proteas' hopes of reaching the World Cup semi-finals.
The Black Caps' skipper kept his cool at the end of a nerve-jangling match that went down to the last over with eight runs still required, hoisting Andile Phehlukwayo for a huge six over midwicket to bring up a majestic century.
He sliced the next ball for four as New Zealand reached their target of 242 with thee balls to spare in a match reduced to 49 overs per side due to a wet outfield.
The close finish in Birmingham was just the tonic the World Cup needed after a string of one-sided results and rain-ruined fixtures sapped the tournament's momentum.
The win puts unbeaten New Zealand top of the 10-team table in the round-robin phase of the competition in England and Wales while South Africa are languishing third from bottom after just one win in six matches.
Williamson, who finished on 106 not out, was helped by Colin de Grandhomme's superb 60 off 47 balls on a tricky pitch after the Kiwis had slipped to 137 for five.
The captain rode his luck when South Africa failed to ask for a review before replays showed he had edged a ball from Imran Tahir to wicketkeeper Quinton de Kock when on 76.
South Africa missed a golden chance to run him out at the start of the 41st over and he was dropped by Lungi Ngidi when on 85, but off a no-ball.
Earlier, Martin Guptill (35), who had been guiding New Zealand towards their target with a minimum of fuss, trod on his stumps to spark a mini collapse.
Ross Taylor and Tom Latham followed quickly to leave New Zealand struggling at 80-4.
Jimmy Neesham (23) steadied the ship with his skipper but when he was out the Black Caps were plunged back into trouble.
De Grandhomme came to New Zealand's rescue, batting positively and bringing up his fifty off 39 balls but he was caught in the deep by South Africa captain Faf du Plessis off Ngidi in the penultimate over.
Despite the late drama, Williamson kept his cool to see the beaten 2015 finalists home -- they finished on 245-6.
Earlier, Rassie van der Dussen gave South Africa something to bowl at as the Proteas -- who lost a thrilling semi-final to New Zealand four years ago -- struggled to 241-6 after losing the toss.
Hashim Amla made a sluggish 55 off 83 balls but Van der Dussen's 67 not out came at better than a run a ball.
During his innings, Amla became the fourth South African to reach 8,000 runs in one-day internationals.