When Deepti Sharma had Mignon du Preez dismissed off the penultimate delivery of the chase, with three still needed, it seemed certain that India would grasp the win they needed... but Du Preez was called back for a no ball
Christchurch: India 274-7, South Africa 275-7 - South Africa won by three wickets
A World Cup full of drama continued to deliver to the very final ball of its group stage, as South Africa sneaked victory over India to send their opponents crashing out of the tournament.
The Proteas, who has already qualified for the knockout rounds prior to the start of play in Christchurch, successfully pursued their target of 275 - their highest successful chase in one-day internationals - to ensure it is West Indies, and not India, who will face Australia in the semi-finals.
South Africa were left needing 20 off the final three overs, and six off the last - bowled by Deepti Sharma. When Sharma had Mignon du Preez dismissed off the penultimate delivery, with three still needed, it seemed certain that India would grasp the win they needed to guarantee their own spot in the last four.
But Du Preez received a reprieve. Sharma had overstepped - marginally, but by enough for TV official Langton Rusere to be certain - and Du Preez returned to strike the winning runs.
South Africa's Mignon du Preez celebrates dramatic victory over India (Sanka Vidanagama/AFP via Getty Images)
This was South Africa's fifth victory of the group stages, to go with a washout and solitary defeat, to the Australian juggernaut.
They will face England in the semi-finals, having already beaten the defending champions in this tournament.
Confidence is high, and the squad's form is good.
The nature of this victory will only lift morale further, with South Africa having to battle for the result.
India took the upper hand initially, with Shafali Verma and Smriti Mandhana both making half-centuries at the top of the order, and sharing in a stand worth 91 for the first wicket.
When Verma (53) departed, run out, and Yastika Bhatia (2) soon followed, Mithali Raj combined with Mandhana to push India's total along at a happy rate.
Raj made 68 from 84 balls and put together a third-wicket partnership worth 80 with Mandhana in 14-and-a-half overs. Mandhana's stay was ended on 71 by Masabata Klaas, who later also claimed the scalp of Raj to finish with figures of 2 for 38 from her eight overs. Klaas was, along with Shabnim Ismail (2 for 40 in 10), the pick of the South African bowlers.
India have been knocked out of the World Cup (Sanka Vidanagama/Getty Images)
Harmanpreet Kaur's 48 took India to a score of substance, and South Africa knew a good start was crucial in a tough chase.
They know, too, that they can rely on Laura Wolvaardt.
Wolvaardt was imperious again with the bat as she made 80, her fifth half-century of the tournament, to set the tone.
Lara Goodall weighed in with 49, sharing in a stand worth 125 with Wolvaardt for the second wicket after the early loss of Lizelle Lee, while Sune Luus (22) and Marizanne Kapp (32) kept the innings moving through the middle order.
And it was left to Du Preez, and a helping heel from Sharma, to finish the job.