India rallied around swing bowler Mohammed Shami's three-wicket performance on Friday to beat the West Indies by four wickets and remain unbeaten and in first place in Pool B at the Cricket World Cup.
Chasing West Indies' modest 182 all out, India scored 185 for six in 39.1 overs. The defending champions made heavy weather of the target before skipper Mahendra Singh Dhoni saw the side through with an unbeaten 45.
Earlier skipper Jason Holder scored 57 runs to lift the West Indies from 124-8 after winning the toss and batting.
Shami, named man of the match, returned to the side from injury to claim 3-35. Seam bowler Umesh Yadav and leftarm spinner Ravindra Jadeja took two wickets apiece as India clinched a quarterfinal place.
There were solid contributions from the Indian middle order from Virat Kohli (33) and Suresh Raina (22).
The West Indies' pace bowling attack chipped into the Indian top order and reduced India to 107 for five. But Dhoni was solid and with Ravindra Jadeja (13) and Ravichandran Ashwin, 16 not out, figured in a match-winning stand of 51 runs for the seventh wicket.
Dhoni hit a six and three fours off 56 balls.
Jerome Taylor and Andre Russell took two wickets each for the West Indies.
Earlier, the West Indies teetered on 85 for seven from the Indian new-ball attack of Shami and Umesh Yadav (2-42).
Holder hit three sixes and four boundaries off 64 balls to resurrect the innings, first with Darren Sammy (26), and then in a 51-run ninth-wicket stand with Taylor (11).
The West Indies' indifferent form in the tournament continued and, in another unforgettable batting display, the Caribbean side was dismissed with 28 balls left in its innings.
Holder's innings stood between West Indies and a meek capitulation as the lower-order batsmen rallied around the skipper.
Shami, returning to the starting lineup after missing the last outing against the United Arab Emirates, extracted pace and bounce from a pitch renowned for it.
In the first 10 overs, the West Indies struggled to put bat to ball as Shami and Yadav forced openers Dwayne Smith and Chris Gayle to play and miss regularly. The bounce was disconcerting and seam and swing unplayable.
The dangerous Gayle, who scored a record 215 in an innings earlier in the tournament, lasted 27 balls to score 21 including a six and two fours. In the space of four balls, Gayle was dropped twice before a top edge was well caught by Mohit Sharma off Shami.
Shami claimed both openers in his opening spell and returned later to remove Sammy just when the eighth-wicket stand was beginning to take shape.
Despite restricting the West Indies to a low total, the Indian fielding was sloppy and four catches were put down.