AHMEDABAD, India (AP) —Afghanistan’s decision to bat first after winning the toss against South Africa backfired as the batters couldn’t score runs. Keshav Maharaj bowled beautifully and formed a spin web around the rivals.

Hashmatullah Shahidi was caught by wicket-keeper Quinton de Kock while Rahmanullah Gurbaz gave a simple catch to Heinrich Klaasen.

Ibrahim Zadran, who scored a century against Australia in the previous match, managed just 15 runs off 13 balls before Gerald Coetzee got rid of him.

At the time of writing, Afghanistan were 58/3 in 15 overs.

South Africa is already assured of a semifinal spot against five-time champion Australia.

Afghanistan is still mathematically in the hunt for fourth place. It is on eight points and is trailing New Zealand, which is on 10 points.

The bigger concern is the net run-rate difference – New Zealand elevated its run-rate to plus 0.743 after beating Sri Lanka by five wickets on Thursday.

Afghanistan is coming off an emotion-charged loss to Australia, when it had control until Glenn Maxwell posted an extraordinary, unbeaten double century.

While first needing a win, Afghanistan also needs to beat South Africa by 439 runs to surpass New Zealand’s net run-rate.

Hosts India will play the fourth-place team in the semifinals. Pakistan, also on eight points, is still in contention and needs to beat England on Saturday by a similarly improbable margin to get ahead of New Zealand.

Afghanistan fielded an unchanged side from its previous game against Australia.

South Africa made two changes from the lineup that lost to unbeaten India. Allrounder Marco Jansen has been rested, with Andile Phehlukwayo coming in as replacement. Pace bowler Gerald Coetzee replaced wrist spinner Tabraiz Shamsi.

The pitch at the Narendra Modi Stadium should suit the batters, with spin coming into play as the game progresses.

___

Lineups:

Afghanistan: Rahmanullah Gurbaz, Ibrahim Zadran, Rahmat Shah, Hashmatullah Shahidi (captain), Azmatullah Omarzai, Mohammad Nabi, Rashid Khan, Ikram Alikhil, Mujeeb Ur Rahman, Noor Ahmad, Naveen-ul-Haq

South Africa: Quinton de Kock, Temba Bavuma (captain), Rassie van der Dussen, Aiden Markram, Heinrich Klaasen, Andile Phehlukwayo, David Miller, Gerald Coetzee, Keshav Maharaj, Kagiso Rabada, Lungi Ngidi