India defeated rivals Pakistan 3-0 in a bowl-out after the two teams had played out a thrilling Twenty20 tie under lights in Durban.
Virender Sehwag, Harbhajan Singh and Robin Uthappa were all on target to give India a victory that means they finish top of Group D.
Pakistan still go through to the next round of the tournament, though they will be wondering just how they failed to win.
Chasing 142, they seemed dead and buried when Shahid Afridi was the sixth wicket to go down, leaving a further 39 off the final 14 deliveries.
However, Yasir Arafat proceeded to belt 10 off the next two balls, and with Misbah-ul-Haq crashing two boundaries at the start of the final over, the scores were tied with two deliveries to go.
Shanthakumaran Sreesanth held his nerve to save the day for India, though, Misbah (53) being run out off the final ball trying to sneak the match-winning single.
The dramatic finish was a fitting finale to a see-saw Twenty20 battle that wasn't even dampened by three breaks for rain.
India had found it hard going after being put into bat by Shoaib Malik, Mohammad Asif demolishing their top order with an impressive spell that saw him take 4-18.
It was left to Robin Uthappa, who made 50 off 39 balls, and skipper Dhoni (33) to rebuild the innings with a 46-run partnership.
Irfan Pathan then came in at seven to belt a quick 20, including back-to-back sixes off Afridi, as India managed to reach a respectable 141-9.
Pakistan's reply suffered a shaky start too, the first four wickets going down with just 47 on the board as the seamers continued to enjoy themselves on a sporty pitch that had been juiced up by the brief showers.
Pathan claimed two scalps in a miserly four-over spell, while Harbhajan held his nerve to dismiss the dangerous Afridi, who had surprisingly come in down the order.
Misbah's late heroics had appeared to bail out his team, Ajit Agarkar coming in for some particularly heavy punishment as his final over, the penultimate of the match, went for 17.
But an amazing finish left the scores level, and India picked up the points when Pakistan melted under pressure in the bowl-out; Arafat, Umar Gul and Afridi all missing the stumps.