South Africa saw off a spirited fightback from Afghanistan to win by five wickets with 15 balls to spare in their final World Cup group game and consolidate second place in the standings.
South Africa have 14 points from their nine games, two points ahead of Australia who play Bangladesh on Saturday while Afghanistan are sixth.
Both South Africa and Australia have already qualified for the semi-finals, with the two teams set to play each other in Kolkata on Thursday.
“They say winning is a habit so we want to take that momentum through, we take a lot of confidence,” South Africa skipper Temba Bavuma said.
“We did something differently today, we normally bat first but we batted second. To get over the line in that manner will give us confidence.
“We’d like to be playing here again (in the final) in front of a full capacity crowd. But there’s a hurdle we have to get over first against Australia in Kolkata.”
Afghanistan opted to bat first but they failed to build partnerships as South Africa picked up wickets regularly.
The Asian side posted 244 in 50 overs on the back of Azmatullah Omarzai’s unbeaten knock of 97, which included seven boundaries and three sixes.
Azmatullah was alone in putting up a fight and the all-rounder looked destined for a first ODI century but finished three short as Kagiso Rabada conceded just three runs in the final over.
Gerald Coetzee was the pick of the South African bowlers with figures of 4-44 while Quinton De Kock finished with six catches to tie the record for most wicketkeeping dismissals in a World Cup match.
In response, 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 but they were in a spot of bother at 182-5.
But Rassie van der Dussen (76 not out) guided the Proteas home, stitching together a 65-run partnership with Andile Phehlukwayo, who smashed the winning runs with a massive six over deep mid wicket in the 48th over.
“In any chase there has to be an anchor, we had a lovely platform and that made it easy for me to come in and assess the conditions,” Van der Dussen said.
“We’ve seen what our batting lineup can do… We got some good partnerships in the middle there.”
Afghanistan wrapped up their best ever World Cup campaign with four wins and also sealed a place in the Champions Trophy.
Skipper Hashmatullah Shahidi said the tournament was a good learning experience as the team, once considered World Cup minnows, delivered some surprise wins.
“We gave a good message to the world, we played big teams and fought till the end,” he said.
“I’m proud of what our batsmen did in this tournament, we were struggling before the tournament… It’s a positive thing looking to the future.
“Everyone knows we have a good spin department, but if we carry the momentum of what we did with the bat, we will be a very good side.”