Struggling South Africa restricted Afghanistan to 65 for two after 17 overs in their must-win World Cup match in Cardiff on Saturday.
Faf du Plessis's side have endured a torrid campaign so far, losing their first three matches and then picking up one point from a rain-ruined match against the West Indies.Only Afghanistan, with three defeats in three games, are below them in the 10-team table.
Earlier, unfancied Afghanistan made a bright start, reaching 33 without loss when rain temporarily stopped play in the sixth over, with Hazratullah Zazai and Noor Ali Zadran both unbeaten on 16.
After the resumption, Zazai was the first to go, caught by Rassie van der Dussen for 22 off the bowling of paceman Kagiso Rabada before Chris Morris trapped Rahmat Shah in front when he was on six.
South Africa, who were unchanged, won the toss and chose to bowl.
Afghanistan made one change, bringing in former captain Asghar Afghan in place of Najibullah Zadran.
"Chasing when there is rain around generally gives you a better indication of what to do," said Du Plessis.