South Africa's World Twenty20 hopes were left hanging by a thread as West Indies recorded a nervy victory in Nagpur.
West Indies left it late to secure a third win on the bounce to progress to the World Twenty20 semi-finals, leaving South Africa's fate out of their hands.
The Proteas needed a win to move level on points with the Windies and England in Group 1 ahead of the latter's showdown with Sri Lanka.
South Africa looked in disarray at 47-5, but Quinton de Kock (47) and David Wiese led the revival to reach122-8.
However, that proved insufficient as the Windies – led by Johnson Charles (32) and Marlon Samuels (44) – chased it down, if a little nervously, with two balls and three wickets to spare.
Hashim Amla's first-over dismissal to a run out set the tone, with Faf du Plessis adding only nine before being caught by Sulieman Benn off Andre Russell, who then held a top edge from Rilee Rossouw off the bowling of Chris Gayle (2-17).
Just when South Africa looked to be on the path to recovery, AB de Villiers inside edged a Dwayne Bravo delivery and saw his stumps go flying, with Gayle getting some movement to send David Miller walking soon after.
De Kock helped to steady the ship with some confident strokeplay, only to fall when stepping across his stumps in a poorly-executed attempt to sweep Russell.
Wiese stuck around long enough to take South Africa beyond 100 before skying one to Darren Sammy, with Aaron Phangiso the last man to go, run out off the final ball.
Needing to work wonders with the ball, South Africa started promisingly as danger man Gayle was bowled by a superb swinging delivery from Kagiso Rabada.
When Andre Fletcher was run out having made 11, the slow Windies run rate looked to hint at some nerves, which grew when the impressive Charles was out.
Samuels held firm until the finish line was in sight, when he holed out in the deep after Russell and Sammy had already been claimed by Imran Tahir (2-13), but Kraigg Brathwaite clubbed a huge six in the final over to ease the tension as the Windies finally got home.