Stockily built Mohammad Shahzad knocked a brilliant hundred as spirited Afghanistan pulled off a last over tie against India in the Super Four match in Dubai on Tuesday.
Shahzad's 124 laid the foundation of Afghanistan's fighting total of 252-8 in 50 overs before bowling out India in 49.5 overs for the same total at Dubai stadium.
Needing seven to win off the final Rashid Khan over, Ravindra Jadeja hit a boundary off the second ball before taking a single off the next. Last man Khaleel Ahmed then took a single but Jadeja holed out off the fifth to give Afghanistan a morale-boosting tie with the defending champions.
India rested five top players -- skipper Rohit Sharma, Shikhar Dhawan, Yuzvendra Chahal, Jasprit Bumrah and Bhuvneshwar Kumar -- as they had already qualified for Friday's final.
The winner of Wednesday's match between Pakistan and Bangladesh will meet India in the final in Dubai.
India were helped to 110 by openers Lokendra Rahul (60) and Ambati Rayudu (57) and at 166-3 they looked on course for an easy win but Afghanistan pulled back through key wickets.
Rahul hit five boundaries and a six in his 66-ball knock while Rayudu's 49-ball innings had four sixes and as many boundaries.
Dinesh Karthik made 44 and Jadeja scored 25 to bring India closer but India could not cross the finish line.
Spinners Rashid and Mohammad Nabi, and paceman Aftab Alam finished with two wickets apiece.
Despite crashing out with two defeats Afghanistan can hold their heads high as they beat Sri Lanka and Bangladesh in the first round and only lost to Pakistan in the final over.
Earlier, Shahzad knocked a fighting hundred and Mohammad Nabi scored 56-ball 64 to lift Afghanistan after they won the toss.
The 31-year-old Shazad smashed seven sixes and 11 fours in his 116-ball 124 -- his fifth one-day century but first against a top nation.
So dominant was Shahzad that fellow opener Javed Ahmadi was only five in a stand of 65, before India struck four times within the space of 17 runs.
Left-arm spinners Jadeja (3-46) and Kuldeep Yadav (2-38) derailed the innings but Shahzad held one end, adding 50 for the fifth wicket with Gulbadin Naib who made 15 and another 48 for the sixth with Mohammad Nabi.
Shahzad was finally out in the 38th over but by then had given a good platform to his team.