The West Indies beat Afghanistan a short while ago. Photo: Lee Smith/Reuters

LEEDS  West Indies won the battle of the Cricket World Cup's basement dwellers, beating Afghanistan by 23 runs in their final group match at Headingley on Thursday.

Chris Gayle managed only seven runs in his final World Cup appearance but Shai Hope capitalised on an early reprieve to score 77 and help the eliminated Caribbean side to 311-6 after electing to bat.

While Gayle disappointed, 18-year-old Ikram Alikhil top-scored for Afghanistan with a career-best 86 before falling to the 39-year-old part-time spinner from Jamaica.

Afghanistan were all out for 288 in exactly 50 overs  their highest score in the World Cup  to finish their campaign with nine defeats in as many matches, denying their West Indian coach Phil Simmons a winning send-off.

The match against the tournament's weakest side was an opportunity for Gayle to produce a special performance but the prolific left-handed opener failed to take it.

Gayle slashed at a wide Dawlat Zadran delivery to be caught behind, finishing his last World Cup with only one half-century.

West Indies could have been in bigger trouble but Rashid Khan dropped a sitter at mid-wicket off Zadran when Hope was on five.

By the time Rashid caught him, at mid-wicket in the 38th over, Hope had laid a strong foundation for a 300-plus total.

Opener Evin Lewis celebrated his return to the team with 58 and Nicholas Pooran also made 58, his third 50-plus score of the tournament.

Skipper Jason Holder clobbered four sixes in his 45 off 34 balls to help the team past the 300-mark.

Dropped catched, squandered run-out opportunity and misfields marred Afghanistan's fielding, best illustrated in the final over of the West Indies innings.

Afghan captain Gulbadin Naib got himself under a skier at long-off but flinched at the last moment, possibly losing the ball in sunlight, allowing what would have been a regulation catch to go for a boundary.

Naib could not impress with the bat either and fell for eight.

Shah and Alikhil refused to throw in the towel, though, frustrating the West Indies attack with a 133-run partnership.

Carlos Brathwaite (4-63) dismissed Shah as he and Kemar Roach (3-37) snuffed out Afghan hopes of an unlikely victory. 

Reuters