Williamson finished unbeaten on 106 from 138 balls in a composed innings to guide New Zealand to 245-6 chasing 242 for victory. The unbeaten New Zealanders moved to the top of the World Cup standings with nine points from four wins and a point from the washout against India. South Africa has just one win from six games and its chances of reaching the playoffs are all but over.
Williamson shared a 91-run partnership with Colin de Grandhomme, who scored 60 from 47 balls, to get the New Zealanders within reach. De Grandhomme's dismissal left New Zealand needing 14 runs from 11 balls and four wickets in hand. Williams angled a boundary off the last ball of the penultimate over to set up a scenario where New Zealand needed eight runs off the last over to win.
Mitchell Santner took a single to start the last over from Andile Phehlukwayo, and Williamson hit the six and the boundary from consecutive balls to finish it off.
Opener Martin Guptill triggered a top-order collapse after becoming the first New Zealander to be dismissed by hitting his wicket in any World Cup tournament.
Guptill slipped after playing a hook shot against Andile Phehlukwayo and accidentally knocked a bail off his stumps.
It was a slice of luck for the South Africans in their must-win encounter.
Guptill's exit left New Zealand on 72-2 after 15 overs — still ahead of South Africa's 60-2 at the same stage — but it quickly got worse when Ross Taylor was caught behind for 1 off Chris Morris in the 17th over.
And even worse in the 19th over after Tom Latham fell in the same manner — caught behind off Morris for 1.
With 20 overs gone, New Zealand is 86-4. Captain Kane Williamson was 33 not out and Morris has 2-18 off five overs.
South Africa scored 241-6.
South Africa needs to protect a total of 241-6 to beat New Zealand and stay in realistic contention for a semifinal spot at the Cricket World Cup.
The Black Caps failed to bowl out a team for the first time at the tournament but will be content with the run chase ahead of them on a mostly batting-friendly wicket at Edgbaston.
The match is 49 overs per team after a rain-delayed start in Birmingham.
Hashim Amla reached a personal landmark of the second quickest batsman to reach 8,000 runs in ODIs, but the 36-year-old opener again took his time with an 83-ball 55.
Rassie van der Dussen provided some late-innings impetus with an unbeaten knock of 67 off 64 balls.
South Africa has reached 112-3 after 28 overs of its must-win Cricket World Cup group match against New Zealand.
Spinner Mitchell Santner claimed a key wicket when he bowled Hashim Amla for an 83-ball 55 featuring four boundaries. That ended a 52-run partnership between Amla and Aiden Markram, who is 26 not out.
Rassie van der Dussen is the new batsman in.
The Proteas lost the toss at Edgbaston and were made to bat first in a game that was reduced to 49 overs per team after a delayed start due to a wet outfield.
Trent Boult bowled Quinton de Kock for 5. Lockie Ferguson bowled captain Faf du Plessis for 23.
Hashim Amla has reached 8,000 runs in one-day internationals and is the second fastest player to get to that landmark, after India's Virat Kohli.
The 36-year-old Amla reached the landmark in the 12th over of the Cricket World Cup group game against New Zealand, grabbing two runs off Black Caps pacer Lockie Ferguson.
The Proteas batsman needed 176 innings overall. Jacques Kallis, AB de Villiers and Herschelle Gibbs are the other South Africans to reach the landmark.
India opener Shikhar Dhawan has been ruled out of the Cricket World Cup because of a left thumb injury.
India says tests have shown that Dhawan has broken a bone and will remain in a cast until the middle of July.
Rishabh Pant, who has been on standby, is set to replace Dhawan in the squad.
Dhawan sustained his injury when he was hit on the hand by a delivery from Australia's Pat Cummins in a group game on June 9. He went on to score a century despite the injury.
New Zealand captain Kane Williamson has won the toss and chosen to bowl first in the Cricket World Cup group game against South Africa at Edgbaston.
The Black Caps kept an unchanged XI from its last completed match, against Afghanistan on June 8.
South Africa fast bowler Lungi Ngidi returns from a hamstring injury in the Proteas' only change from its nine-wicket win over Afghanistan last Saturday. Ngidi replaces Beuran Hendricks.
The start was delayed 90 minutes by a wet outfield, with the match reduced from 50 to 49 overs per team. The wicket appears batting-friendly with overcast conditions improving.
It's their eighth meeting at the World Cup. The Black Caps lead 5-2 and have won the last four, but New Zealand hasn't won an ODI at Edgbaston since 1983.
New Zealand: Martin Guptill, Colin Munro, Kane Williamson (captain), Ross Taylor, Tom Latham, Jimmy Neesham, Colin de Grandhomme, Mitchell Santner, Matt Henry, Lockie Ferguson, Trent Boult.
South Africa: Hashim Amla, Quinton de Kock, Aiden Markram, Faf du Plessis (captain), Rassie van der Dussen, David Miller, Andile Phehlukwayo, Chris Morris, Kagiso Rabada, Imran Tahir, Lungi Ngidi.
New Zealand and South Africa are scheduled to start their group game at midday with the sun having made an appearance at Edgbaston. The match has been reduced from 50 to 49 overs per team after a 90-minute delay due to a wet outfield.
The start of the Cricket World Cup group game between New Zealand and South Africa at Edgbaston has been delayed by a wet outfield.
After a pitch inspection at 10:15 a.m. local time, umpires Nigel Llong and Ian Gould will inspect the pitch again at 11 a.m. Conditions have been overcast, and there's the possibility of light rain later this morning, but the weather forecast for the rest of the day at Edgbaston is good.
The 25th game of this World Cup is Edgbaston's first. The popular Birmingham venue, where the lively atmosphere can reach soccer-style levels, hosts five games in total, including the second semifinal on July 11.
South Africa is under pressure to beat New Zealand as the teams continue their combined 88-year quest for a Cricket World Cup title when they meet at Edgbaston on Wednesday.
The South Africans must win to keep alive any realistic hope of a semifinal spot, following defeats to England, Bangladesh and India. Unbeaten New Zealand will leapfrog England and Australia to go top of the 10-team standings with a win.
Since the first edition of the tournament in 1975, South Africa has been a four-time semifinalist but never made the final. New Zealand lost the 2015 final to archrival Australia after beating South Africa in a classic semifinal in Auckland.
South Africa quick Lungi Ngidi is set to return after recovering from a hamstring injury, while opener Hashim Amla is 24 runs away from becoming the fourth Proteas player to reach 8,000 ODI runs.
Rain is possible in the morning before the weather is expected to improve in Birmingham.
More AP cricket: www.apnews.com/cricket and https://twitter.com/AP_Sports