South Africa needed a dramatic late turnaround to beat Nepal by one run in a nail-biting T20 World Cup encounter.
Needing two to win from the last ball, or one to force a super over, Nepal's Gulsan Jha was run out trying to run a single to the wicketkeeper.
In a remarkable finale, Jha missed a short ball from Ottniel Baartman and started running, the throw from keeper Quinton de Kock deflected off the batter's back to Heinrich Klaasen and the fielder threw down the stumps.
After restricting South Africa to 115-7 in Kingstown, Nepal were well on their way to a victory that would have kept their Super 8s hopes alive.
However, Tabraiz Shamsi (4-19) struck twice in a game-changing 18th over and Baartman defended seven runs in the last as the Proteas maintained their 100% record in the tournament to eliminate a heartbroken Nepal.
Meanwhile, New Zealand earned their first win of the competition with a nine-wicket demolition of Uganda in Trinidad.
Tim Southee took 3-4 as the already-eliminated Black Caps skittled Uganda for 40 before knocking off the runs in 5.2 overs.
The spinners came to the fore on a slow, turning track in St Vincent and for much of the game it seemed that the Nepal bowlers would be the match-winners.
They kept a powerful South Africa batting unit under control throughout with wrist-spinner Kushal Bhurtel (4-19) the standout and Dipendra Singh Airee taking 3-21 with his off-breaks.
Reeza Hendricks top-scored with 43 but with the Nepal bowlers on top, it took a cameo from Tristan Stubbs (27* off 18 balls) to give the Proteas an ultimately vital late boost.
"You have to give Nepal a lot of credit, throughout the game they put us under a lot of pressure and it shows the quality they have," said South Africa captain Aiden Markram.
Nepal began their chase well, got through the powerplay unscathed and even when Shamsi claimed two wickets in the eighth over, they calmly pressed on.
A 50-run stand between Aasif Sheikh and Anil Sah was broken by Markram in the 14th over but with just 30 more needed, Nepal remained on track for victory.
But when Shamsi had Singh Airee caught behind down the leg side before bowling Aasif for 42 to leave Nepal 100-5, the nerves set in.
Nepal still whittled it down to eight to win from the last over, seven for the super over, and that became two from two balls.
Baartman came through for South Africa, though, and they clung on for the narrowest of victories.
"Definitely relieved," said Shamsi. "The team is standing up to the pressure and that's great to see."
Nepal captain Rohit Paudel added: "I'm very proud of the unit, the way we bowled and batted.
"We were very close but a little far."
New Zealand's exit from the tournament had been confirmed late on Thursday but Kane Williamson's side responded with an emphatic win over Uganda.
The Black Caps were on top from the first over as Trent Boult took two wickets in two balls and Uganda soon slumped to 15-5 at the Brian Lara Cricket Academy.
Kenneth Waiswa made 11 and was the only Uganda batter to reach double figures, while no Kiwi bowler conceded more than nine.
After wickets in successive balls from Southee in the 18th over, Mitchell Santner wrapped up the innings in the 19th.
Devon Conway then made an unbeaten 22 from 15 balls as New Zealand completed the win in barely a quarter of their allotted overs.
"The guys did well," said Williamson. "Obviously there was a lot there in the surface and it was nice to do that job in the first half."
For Uganda, their debut at a major global event in any of cricket's formats ends with a record of one win and three defeats in the group.
"It's been a wonderful experience for us as a team," said captain Brian Masaba.
"Playing at this level for the first time, being exposed to the high performance level at this World Cup has been eye-opening for us. But more importantly, it has done wonders for the game back home."