Former champions India beat South Africa by one run yesterday but still crashed out of the World Twenty20 as Pakistan went through to the semifinals by virtue of a higher run rate.
India made 6-152 in their 20 overs and needed to restrict South Africa to 121 runs or less to reach the last four at Pakistan's expense.
In the event they bowled their opponents out for 151 in a narrow but academic victory. Pakistan will meet hosts Sri Lanka in the first semifinal in Colombo tomorrow while Australia, who went through on run rate despite losing to Pakistan, will play West Indies on Saturday.
"Overall I am quite happy with how the team performed, but there were instances where we should have had 10-15 runs more on the board. We lost too many wickets early in this match," said Indian captain Mahendra Singh Dhoni. South African captain AB de Villiers said his team, who lost all three games in the Super Eights, "didn't click" and had let their country down.
"Disappointed isn't the word to describe it, we've had a poor tournament," said de Villiers. "We've let the country down and that's what hurts the most. We did all the preparation possible, we thought we were ready but the guys didn't click."
Faf du Plessis led the South African reply with an aggressive 65, studded with two towering sixes and six boundaries off just 38 balls.
When he fell in the 13th over 58 runs were still needed but India's bowlers led by Zaheer Khan (3-22) kept their nerve to record their second win in three Super Eights encounters.
South Africa, who had lost both of their two earlier matches in the round of eight, needed 14 off the last Lakshmipathy Balaji over.
Albie Morkel hit a six off the first ball but was bowled off the second.
Morne Morkel also hit a six off the fourth ball but Balaji snatched the win when he bowled the last man with a full-length delivery, ending on figures of 3-37.
India owed their total of 6-152 to Suresh Raina's 45. Raina hit five boundaries during his 34-ball knock and added 44 for the fifth wicket with Rohit Sharma, who made 25.