Neither side can qualify for next week's World Cup semi-finals
West Indies beat Afghanistan by 23 runs in the final group match for both sides at the 2019 International Cricket Council (ICC) World Cup on Thursday.
Batsman Shai Hope top-scored for the West Indies at Headingley with 77 while batsman Nicholas Pooran and captain Jason Holder stepped up the pace as they reached 311-6 in their 50 overs.
Afghanistan mustered 288 all out in reply to fall to their ninth defeat out of nine despite a fighting 86 from batsman Ikram Alikhil.
Veteran Chris Gayle removed Afghanistan top-scorer Ikram Alikhil with his tame off-breaks as the West Indies secured just their second win of a chastening World Cup campaign on Thursday.
Gayle, almost certainly playing in his final World Cup match at the age of 39, failed with the bat but struck with the ball, trapping Alikhil lbw for 86 in the 36th over to put a huge dent in Afghanistan's slim hopes of victory.
Despite the victory, two-time former champions West Indies remain second-bottom of the 10-team table and will slink home with just two wins from nine matches.
Afghanistan have flickered in spells during only their second World Cup — going close against India and Pakistan — but head home with a dispiriting nine defeats out of nine.
Even highly rated leg-spinner Rashid Khan ended the tournament with just six wickets after taking 1-52 on Thursday.
Neither side can qualify for next week's World Cup semi-finals.