ICC Champions Trophy, Edgbaston: Pakistan 201-7 beat India 200 by three wickets.
Yousuf Youhana steered Pakistan to a last-over victory over India to clinch a Champions Trophy semi-final against the West Indies on Wednesday.
Youhana's 81 not out completed a recovery from 27-3 in reply to India's 200.
He was aided by captain Inzamam-ul-Haq, who passed 10,000 runs in one-day internationals in his innings of 41.
Youhana sealed victory in the last over after Naved-ul-Hasan and Shoaib Akhtar had earlier each claimed four wickets, Rahul Dravid's 67 India's top score.
Inzamam and Youhana steadied the ship after Irfan Pathan had taken three early wickets to give India hope of victory despite their modest total.
Their partnership of 75, taking the score on to 102-4, was the crucial one after Parthan, the highest wicket-taker in ODIs this year, took his tally to 46.
He had both Imran Farhat and Shoaib Malik caught behind before Yasir Hameed went trying to hook a short ball.
Inzamam became only the second player, after Sachin Tendulkar, to reach 10,000 runs in ODIs when he reached 23.
But he perished attempting to cut Ajit Agarkar down to third man, while Abdul Razzaq followed for nine to leave Pakistan on 127-5.
That became 152-6 when Moin Khan departed for 10, but Youhana remained resolute at the other end, despite receiving attention for cramp.
Pathan had Pakistan in trouble
After an opening seven-over spell of 3-11, Pathan's figures took a battering when he was summoned back into the attack with seven overs left.
The mercurial Shahid Afridi opted to take him on and cracked two huge sixes to turn the tide decisively towards Pakistan.
Afridi's departure for 25, off 12 balls, maintained the tension right to the end, but Youhana and Hasan saw them home with four balls to spare.
India captain Sourav Ganguly had spoken beforehand about the importance of batting well in the first 10 overs.
He was duly proved right, but not in the manner he would have wished as his early departure was followed by two colleagues in that period.
Ganguly, who had already played and missed twice, edged the fifth ball of the innings from Mohammad Sami to Moin for a duck.
VVS Laxman, in the fourth over, and Virender Sehwag, in the 10th, then both went pulling Hasan to Shoaib Malik in front of square.
That left India 28-3 before a partnership of 45 between Dravid and Mohammad Kaif restored some order.
Shoaib struck at crucial times
But a fired-up Shoaib, denied the new ball, struck twice with two wickets in his third over to leave India reeling at 73-5 in the 20th over.
Some extra pace and bounce accounted for both Kaif, who made 27, and Yuvraj Singh, who gave Moin his second and third catches.
Shoaib repeated his double whammy in the final over of the innings to dismiss Pathan and Ashish Nehra and finish with 4-36.
But in between times the patient Dravid, and the more aggressive Agarkar (47) - once Rohan Gavaskar had departed for a painful 13 - partially repaired the damage.
India looked like getting 220-plus with Dravid and Agarkar still there, but Dravid's dismissal in in the 46th over allowed Pakistan to restrict the size of their victory target.
India: S Ganguly (capt), V Sehwag, V Laxman, M Kaif, R Dravid (wkt), Y Singh, R Gavaskar, A Agarkar, H Singh, I Pathan, A Nehra.
Pakistan: Inzamam-ul-Haq (capt), Yasir Hameed, Imran Farhat, Shoaib Malik, Yousuf Youhana, Shahid Afridi, Abdul Razzaq, Moin Khan (wkt), Naved-ul-Hasan, Mohammad Sami, Shoaib Akhtar.