South Africa bowled Afghanistan out in the last ball and restricted them to 244 runs in the 42nd game of the World Cup in Ahmedabad.
All-rounder Azmatullah Omarzai, who missed his maiden ODI century for just three runs, propelled the Afghans to manage a hardworking mediocre total at the Narendra Modi Stadium on Friday.
Opting to bat, Afghanistan showed a dismal batting performance as they lost six wickets in 116 runs.
It was only Azmatullah Omarzai who stood before the Protea bowlers and remained unbeaten for 97 from 107 balls toward the end. He hit three sixes and seven fours to pull the team to a respectable total.
Gerald Coetzee was the pick of the South African bowlers getting a four-wicket haul while each of Lungi Ngidi and Keshav Maharaj got two wickets.
Afghanistan were like the flying birds in the sky showing their charismatic performance in this World Cup. They were well ahead in the race of the semifinals.
However, their confidence was broken away after an unbelievable defeat against Australia on November 7 in Mumbai. The equation to qualify for the last four has become almost impossible for them.
South Africa: Quinton de Kock (wk), Temba Bavuma (c), Rassie van der Dussen, Aiden Markram, Heinrich Klaasen, Andile Phehlukwayo, David Miller, Gerald Coetzee, Keshav Maharaj, Kagiso Rabada, Lungi Ngidi.
Afghanistan: Rahmanullah Gurbaz, Ibrahim Zadran, Rahmat Shah, Hashmatullah Shahidi (c), Azmatullah Omarzai, Mohammad Nabi, Rashid Khan, Ikram Alikhil (wk), Mujeeb Ur Rahman, Noor Ahmad, Naveen-ul-Haq.