South Africa seal second place and a semifinal against Australia, while Afghanistan confirm place in the Champions Trophy.
South Africa saw off a spirited fightback from Afghanistan to win by five wickets with 15 balls to spare in their final Cricket 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 semifinals, 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 on Friday 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.”
After the match, Bavuma said his “stubborn” nature will help dull the pain of injury as he plots a path to the World Cup final.
“My leg is sore. I don’t know the extent of it yet but I’ll have to be fine. I am stubborn, it will have to be fine,” said the 33-year-old, who made 23 runs on Friday.
“I could have not batted, but I want to be out there for my team,” added Bavuma who missed the wins over England and Bangladesh earlier in the tournament through illness.
“It was an opportunity to get time in the middle that I didn’t want to miss. Leading this team is so important to me, to marshal the bowlers and keep building that, so I felt it was the right decision to stay out there.”
Afghanistan, meanwhile, 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.”