Gayle, almost certainly playing in his final World Cup match at the age of 39, failed with the bat but struck with the ball
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.
The Caribbean side scored 311 for six in their 50 overs in Leeds and although the Afghans put up a brave fight, they ultimately went down by 23 runs.
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.
The West Indies, who smashed 111 runs of the last 10 overs, had captain Jason Holder and Nicholas Pooran to thank for their acceleration after solid contributions from Evin Lewis (58), Shai Hope (77) and Shimron Hetmyer (39).
Gayle was caught behind after a slash against Dawlat Zadran for just seven and remains 10 runs short of Brian Lara's all-time West Indian record of 10,348 one-day international runs.
Pooran picked up where he left off against Sri Lanka, hitting 58 to add to his century in a losing cause earlier this week, Holder smashed a quickfire 45 while Carlos Brathwaite lashed 14 off four balls.
In reply, Alikhil put on 133 for the second wicket with Rahmat Shah (62) and there were notable contributions by Najibullah Zadran and Asghar Afghan but ultimately they did not have the batting firepower to get them over the line.
A fantastic catch on the last ball to seal a 23-run win for West Indies!— ICC (@ICC) July 4, 2019
Afghanistan make a fight of it, but fall short as they end #CWC19 without a win.
Highlights on the app ⬇️
APPLE 👉 https://t.co/VpYh7SIMyP
ANDROID 👉 https://t.co/cVREQ16w2N pic.twitter.com/f5fwdHklIl
Paceman Kemar Roach was the pick of the West Indies bowlers, finishing with figures of 3-37 in his 10 overs.
West Indies began the tournament with a comprehensive seven-wicket win against Pakistan and many tipped them as dark horses for the title, with a power-packed batting line-up and fearsome pace attack.
But they have been error-prone and lacklustre, failing to turn their promising positions into concrete results.
The standings after the conclusion of Afghanistan v West Indies.— Cricket World Cup (@cricketworldcup) July 4, 2019
The teams are rooted to the bottom of the table but have provided great entertainment at times during #CWC19! pic.twitter.com/elN5G9JBVx
Afghanistan will head home with more experience under the belts but with major questions over their batting strength and their lack of quality seam bowlers.
Even highly rated leg-spinner Rashid Khan ended the tournament with just six wickets after taking 1-52 on Thursday.
West Indies INNINGS R B
Gayle c Alikhil b Zadran 7 18
Lewis c Nabi b Rashid 58 78
Hope c Rashid b Nabi 77 92
Hetmyer c sub (Zadran) b Zadran 39 31
Pooran run out (Alikhil/Shirzad) 58 43
Holder c Zadran b Shirzad 45 34
Brathwaite not out 14 4
Allen not out 0 0
Extras (lb4, w9) 13
Total (50 overs) 311/6
Bowling: Mujeeb 10-0-52-0 (w2); D. Zadran 9-1-73-2 (w1); Shirzad 8-0-56-1; Naib 3-0-18-0; Nabi 10-0-56-1; Rashid 10-0-52-1 (w2)
Afghanistan INNINGS R B
Naib c Lewis b Roach 5 6
Rahmat c Gayle b Brathwaite 62 78
Ikram lbw b Gayle 86 93
Najibullah run out (Hetmyer/Brathwaite) 31 38
Asghar c Holder b Brathwaite 40 32
Nabi c Allen b Roach 2 6
Shinwari c Hetmyer b Roach 6 9
Rashid c Holder b Brathwaite 9 16
Dawlat c Cottrell b Brathwaite 1 2
Shirzad c Allen b Thomas 25 17
Mujeeb not out 7 5
Extras (lb2, nb2, w10) 14
Total ( 50 overs) 288/10
Bowling: Cottrell 7-0-43-0 (w3); Roach 10-2-37-3 (w1); Thomas 7-0-43-1; Holder 8-0-46-0 (w2, nb1), Allen 3-0-26-0, Brathwaite 9-0-63-4 (w3, nb1), Gayle 6-0-28-1 (w1)
West Indies won by 23 runs
MOM: Shai Hope