India opener Rohit Sharma hit his fourth century of the World Cup as Virat Kohli’s side booked their place in the semi-finals with a 28-run win over Bangladesh at Edgbaston on Tuesday.

Sharma’s attacking 104 laid the foundation of India’s 314 for nine after Kohli elected to bat first in India’s penultimate match of the league phase.

Yet for the second match in a row Sharma – as happened during India’s 31-run defeat by England at Edgbaston on Sunday – was dropped in single figures before making a hundred.

India’s bowlers then combined to dismiss Bangladesh for 286 with two overs to spare after star batsman Shakib Al Hasan top-scored with a valiant 66. Jasprit Bumrah took four wickets and fellow paceman Hardik Pandya three, including that of Shakib.

Defeat ended Bangladesh’s slim hopes of a place in the last four after they had impressed during wins over South Africa and the West Indies. The day belonged to the in-form Sharma, who played an attacking knock, hitting seven fours and five sixes in his 92-ball innings while being cheered on by another largely pro-India crowd in Birmingham.

Sharma and opening partner KL Rahul put on 180 – the highest stand for the first wicket in the tournament – to get India off to a flying start. But Sharma should have been out for nine only for Tamim Iqbal to drop a simple catch at deep midwicket following a mistimed pull off paceman Mustafizur Rahman.

Sharma was finally was caught at extra cover by Liton Das off the bowling of Soumya Sarkar and Rahul, who filled an opener’s slot following an injury to Shikhar Dhawan, was caught behind off Rubel Hossain for 77.

Mustafizur took five wickets, including star batsman Kohli for 26, to check India’s surge. The paceman struck twice in the space of three balls to dismiss both Kohli and Pandya.

Rishabh Pant once again showed his worth at the number four position with a brisk 48, using the short boundary at one side of Edgbaston to his advantage. M.S. Dhoni, who received flak for his slow innings in India’s defeat by England on Sunday – their only loss so far this tournament – chipped in with a 33-ball 35.

Paceman Mohammed Shami struck early in Bangladesh’s reply when Tamim, who made 22, chopped the ball onto his stumps. Shakib struck his sixth fifty-plus score that includes two hundreds to keep Bangladesh in hunt.

But Pandya’s second spell saw the all-rounder account for Liton and Shakib to leave Bangladesh struggling at 179/6 in the 34th over. Shakib, who has been Bangladesh’s go-to man, played well for his 46th ODI fifty but was undone by a slower ball and caught at extra cover.

Mohammad Saifuddin made an unbeaten 51 only to run out of partners as Bumrah ended the match with two wickets in successive deliveries. Bangladesh face Pakistan in their last group match at Lord’s on Friday. India meet Sri Lanka on the final day of the round-robin phase on Saturday.