Chris Gayle was dismissed for seven on what is likely to be his final World Cup appearance for the West Indies but Shai Hope's love affair with Headingley continued against Afghanistan.
Gayle needed 18 to leapfrog Brian Lara and become the Windies' leading one-day international run-scorer of all-time in this dead rubber fixture, only to toe-edge behind off Dawlat Zadran.
However, Hope, who became the first batsman to record first-class centuries in both innings of a match at this ground two years ago, capitalised on being dropped on five to top-score with 77 in the Windies' 311 for six.
The recalled Evin Lewis contributed 58, while Nicholas Pooran (58 off 43 balls) and Jason Holder (45 off 34) were the benefactors of some sloppy fielding from Afghanistan as the Windies took 111 from the last 10 overs.
Gayle has spoken about prolonging his international career beyond this tournament though the 39-year-old's innings here – after the Windies won the toss and decided to bat first – was almost certainly his international swansong in England.
If this is to prove Gayle's last match on the World Cup stage – he will be 43 at the 2023 edition in India – he exited on a low note, making room for a booming drive only to nick a wider delivery behind.
Hope looked to be ill-at-ease early on and was fortunate to be dropped by Rashid Khan on five, the Afghanistan leg-spinner shelling a regulation catch at midwicket.
Lewis was initially more assertive but after reaching 44 from 43 balls, he added just 14 from his next 35, the pressure eventually telling as he holed out to long-on.
Either side of Hope moving past fifty, Shimron Hetmyer threatened a special innings, depositing Mohammad Nabi twice into the stands before flaying a Dawlat long hop to short midwicket for a punchy 39.
Hope crunched Nabi for back-to-back fours but the leg-spinner would have his revenge, the Windies number three going aerial, only to be caught by Rashid at deep midwicket.
Nicholas Pooran, who made his maiden ODI ton against Sri Lanka earlier in the week, was shelled on nine and 12 off successive deliveries from tournament debutant Sayed Shirzad in separate overs.
It would prove costly as Pooran and Holder laid siege to the boundary rope in a 105-run stand, the latter thumping four sixes, before both departed in the final over.
Carlos Brathwaite went six-four-four in the final three balls, his final boundary just bouncing inside the boundary rope before going over after Afghanistan captain Gulbadin Naib was unsighted by the sun and elected to step away from the path of the ball to protect himself.
Afghanistan were left needing their highest score of the tournament to end their 100 per cent losing streak in this tournament.