Edgbaston - Jonny Bairstow hit a hundred and Ben Stokes added a blistering 79 as England posted an imposing 337-7 against India in a crunch World Cup match for the tournament hosts on Sunday.

England had to win at Edgbaston to keep qualification for the semi-finals in their own hands following successive defeats by Sri Lanka and reigning champions Australia.

Their favoured aggressive batting game came to the fore as they capitalised on captain Eoin Morgan's decision to bat first on a good pitch.

Opener Bairstow made 111, while Jason Roy more than justified his recall after missing three matches with a torn hamstring by making 66 in a first-wicket stand of 160.

Mohammed Shami, roared on by a hugely partisan crowd clad mainly in blue India shirts, took a career-best 5-69, his first five-wicket haul in a one-day international.

But despite the paceman becoming just the second player to take three successive four-wicket hauls in World Cup cricket after Pakistan's Shahid Afridi, India faced a tough task if they were to achieve a win that would guarantee their place in the last four. 

"It was good to be back out there after some time on the bench. We have put a competitive total on the board," Roy said.

"We got a good start. We thought 320ish after the two openers were out so we are happy with that."

India have had 12 targets of 300 or more since the last World Cup, but have only enjoyed a successful chase in three of those matches.  

Pre-tournament favourites England, looking to win the World Cup for the first time, had badly missed Roy. 

Roy, however, was quickly into his stride, with the Surrey star chopping his second ball from Shami for four.

Bairstow, involved in a pre-match spat with former England captain Michael Vaughan after suggesting pundits wanted England to lose, had two lucky breaks when big inside edges missed the stumps.

India captain Virat Kohli brought on leg-spinner Yuzvendra Chahal in the sixth over but Bairstow soon hit him down the ground. 

Roy could have been out on 21 when India all-rounder Hardik Pandya appealed for a caught behind down the legside off his fourth delivery.

But Pakistani umpire Aleem Dar signalled a wide instead and Kohli opted against a review, although replays suggested the ball had touched Roy's glove.

Roy then hit Pandya's next ball for six.

Bairstow went to fifty when he launched Chahal for a six that just cleared the back-pedalling KL Rahul at long-on, the fielder landing awkwardly as he made a desperate attempt at a catch.

Roy then followed Bairstow to the landmark in just 41 balls before, on 66, Ravindra Jadeja, the substitute for Rahul, ran in from long-on to hold a low diving catch.

Bairstow twice more clubbed Chahal over long-on for six.

A single off Pandya saw Bairstow to a 90 ball-hundred, including eight fours and six sixes. But his innings ended when he carved Shami to Rishabh Pant at deep cover.

Stokes maintained the momentum in a 54-ball innings before he was caught off Jasprit Bumrah in the last over.