South Africa saw off a spirited fightback from Afghanistan to win by five wickets in their final World Cup group game and consolidate second place in the standings.
The Proteas have 14 points from their nine games, two points ahead of Australia who play Bangladesh on Saturday. Both South Africa and Australia have already qualified for the semi-finals.
Afghanistan wrapped up their best ever World Cup campaign with four wins and also sealed a place in the Champions Trophy.
The Asian side opted to bat first and posted 244 in 50 overs on the back of Azmatullah Omarzai's unbeaten knock of 97, which included seven boundaries and three sixes, while Gerald Coetzee was the pick of the South African bowlers with figures of 4-44.
In response, South Africa opener Quinton de Kock set up the chase with a breezy 41 that took him to the top of the tournament's scoring charts on 591 runs.
Rassie van der Dussen (76 not out) then guided the Proteas home, stitching together a 65-run partnership with Andile Phehlukwayo (39 not out), who smashed the winning runs with a massive six over deep mid wicket in the 48th over.


England dismiss Pakistan for 110 to seize control of Lord's test
Raphinha, Fermin score as Barcelona beat Athletic in home opener
Celtic and Rangers to play cup match behind closed doors after pitch invasion
Chelsea and Fulham reach League Cup third round as Welbeck scores on debut
PSG to meet Barca, Man City as Champions League draw throws up marquee ties