Just four days after conceding 397 runs to England, Afghanistan restricted India to 224-8 and made a good fist of the chase until the last over. Afghanistan needed 16 to win from the last six balls with three wickets in hand.
Mohammad Nabi hit a boundary off the first delivery by fast bowler Mohammed Shami. Nabi refused a single off the second delivery to keep the strike. On the third delivery, he was caught at long on to end a nerveless 55-ball 52-run knock, more than his previous five innings combined.
But the drama wasn't over. Shami's yorker took out Aftab Alam's leg stump, then his next yorker bowled Mujeeb Ur Rahman to end the match, and Shami became the second India bowler to take a World Cup hat trick and the 10th overall.
"How good you come back and finish your over is what's important. That's what Shami did," teammate Kedar Jadhav said. "After getting hit for the first ball, he got a wicket and kept on picking those wickets. That's when character comes into play."
Afghanistan's innings didn't get early momentum as Shami got rid of Hazratullah Zazai for 10. But it was propelled by partnerships of 44 between Rahmat Shah and skipper Gulbadin Naib (27), and 42 between Shah and Hashmatullah Shahidi (21).
Man-of-the-match Jasprit Bumrah (2-39) got rid of Shah and Shahidi in the 29th over, starting his second spell with a double-wicket maiden that turned the pressure back on Afghanistan. We wanted to create pressure and take the run rate high. It was a tight game and I backed my skills," Bumrah said.
Hardik Pandya put in a serious shift for 2-51 as India used only five bowlers. Surprisingly, its much celebrated wrist spinners Kuldeep Yadav (0-39) and Yuzvendra Chahal (2-36) paled beside the Afghanistan spinners.
Bumrah's spell proved to be the turning point. India struck at regular intervals thereafter and never let the chase settle down. Afghanistan did well to take the match to the last over, making India worry to the end and keep its fans on edge for the entire day.
Nabi's half-century came up off 53 balls as he put on 36 runs for the sixth wicket with Najibullah Zadran (21) and raised visions of a shock upset. India relied on match-winning experience. Pandya struck for a second time to get rid of Zadran in the 42nd over.
Afghanistan's hopes were pinned on Nabi, and he maneuvered the chase to the last over, until holing out off Shami. India, unbeaten after five games, was third in the standings. Afghanistan has lost all six of its games.
"You get better and better by playing against good teams, and this is the team I wanted," skipper Gulbadin Naib said. "India is my favorite team, my favorite is also Virat Kohli. We had a chance to beat them. We played poorly against England and in the four games before that. But we did a lot of good things today."
Earlier, Rashid Khan, who conceded a World Cup-record 0-110 against England, atoned against India with figures of 1-38 from 10 overs. In all, Afghanistan's spinners picked up five wickets as India's batsmen never really got momentum going on a tricky pitch.
Kohli top-scored with 67 off 63 balls, including five boundaries, and was the best batsman on display. Kohli batted as if on a different pitch to his teammates, finding gaps well, rotating the strike, and stroking the occasional boundary to reach his 51st ODI half-century from 44 balls.
The big moment came when he was caught off Nabi (2-33) at short third man in the 31st over. Mahendra Singh Dhoni (28) and Kedar Jadhav (52) stabilized the innings with 57 runs for the fifth wicket. But Dhoni faced 52 balls and his innings ended tamely in the 45th over when he was stumped for only a second time in an ODI since 2011.
Jadhav's 66-ball half-century was the saving grace of India's final 10 overs as the No. 2-ranked team was restricted to just 49 runs. "Their bowlers bowled slow and we had to pick our shots," Jadhav said. "We were looking for a score of 250-260, but we well short by 20-30 runs. We knew we had to make up those runs in fielding."
India faces the West Indies next on Thursday.
More AP cricket: www.apnews.com/cricket and https://twitter.com/AP_Sports