India failed to reach the World Twenty20 semi-finals despite beating South Africa by one run in a gripping final Super Eight Group Two match.
India's total of 152 for six was not enough because in the 17th over eliminated South Africa passed the target of 121 runs that ensured Australia and Pakistan would move into the last four.
Hosts Sri Lanka will meet Pakistan in the first semi-final in Colombo on Thursday and Australia take on the West Indies on Friday in the same stadium.
The final is on Sunday.
India scratched their way past 150, boosted by a late burst from Suresh Raina (45) and captain MS Dhoni (23 not out).
South Africa lost in-form opener Hashim Amla second ball but thanks to Faf du Plessis's rapid 65 they threatened a first Super Eight victory before falling just short, Zaheer Khan claiming figures of three for 22 for India.
Lakshmispathy Balaji was twice hit for six in the final over but he bowled Albie Morkel and his brother Morne to seal victory with one ball to spare.