Rohit Sharma shone with his fourth hundred of the 2019 World Cup as India set Bangladesh 315 to win at Edgbaston.
India were back in Birmingham just two days after suffering their first defeat of the tournament to England.
But any demons appeared to have been exorcised as Sharma (104) and KL Rahul (77) laid the foundations of India's 314 for nine with a tournament-best opening partnership of 181.
At that stage Bangladesh might have feared chasing a total of 370-380 to maintain their interest in the tournament.
But India skipper Virat Kohli scored only 26 and Mustafizur Rahman's five-wicket haul gave Bangladesh hope of an unlikely victory that would keep alive semi-final ambitions.
Rohit, as he has done previously in this competition, made the most of some good early fortune to punish the Tigers' attack.
The opener had only scored four against England when he was spilled by Joe Root in the slips and went on to make 102.
He had reached nine this time when he flicked Mustafizur towards the mid-wicket boundary.
Tamim Iqbal made good ground to his left to set up what should have been a straightforward catch, but the opportunity was shelled to the horror of the Bangladesh fans in a noisy Edgbaston crowd.
Shakib Al Hasan's spin managed to apply some control for Bangladesh, but it was to prove a costly error as Rohit bludgeoned his way to become the tournament's top run scorer.
Rohit joined Sachin Tendulkar in becoming only the second India batsman to score 500 runs at two different World Cups when he reached 60.
He had eventually made 104 from 92 balls, with seven fours and five sixes helping take his tournament run haul to 544, before chipping Soumya Sarkar to Liton Das at cover.
Rahul's own 92-ball stay ended when he attempted to cut a delivery from Rubel that was too close to him and wicketkeeper Mushfiqur Rahim took a low catch.
Kohli played some classic drives before pulling Mustafizur to the waiting Rubel on the mid-wicket rope and the hard-hitting Hardik Pandya picked out slip two balls later.
Rishabh Pant hammered 48 from 41 balls but the innings slowly subsided after he picked out Mosaddek Hossain in the deep, the fielder just about holding on at the second attempt.
That gave Shakib his first wicket, a tidy effort from the spinner who conceded only 41 runs from his 10 overs.
Mustafizur produced a superb finish to end with five for 59 as MS Dhoni, criticised for his passive batting at the end of the run chase against England, failed to fully redeem himself.
Dhoni offered a steepling catch on 35 and Bhuvneshwar Kumar, run out off a wide, and Mohammad Shami also fell in the final over as the India innings ended meekly.