Two goals from Samuel Chukwueze and William Troost-Ekong handed the Super Eagles the win, while Bongani Zungu netted Bafana’s consolation goal.
Bafana failed to clear away the Germany-based full-back’s low cross and Chukwueze pounced and beat South Africa goalkeeper Ronwen Williams from close range to make 1-0 to Nigeria.
Bongani Zungu scored with a header from Percy Tau’s free-kick with lanky midfielder netting his scored goal of the tournament, but the goal was ruled out for offside. Match referee Rédouane Jiyed then consulted with Video Assistant Referee (VAR) and the goal was given to South Africa to make it 1-1 with 19 minutes left on the clock.
However, Bafana lost concentration in the closing stages of the game and they were punished by William Troost-Ekong.
An unmarked Troost-Ekong fired home from second half substitute Moses Simon’s corner-kick in the 89th minute to seal Nigeria’s 2-1 victory over South Africa.
The Super Eagles will now take on the winner between Algeria and Ivory Coast in a semi-final clash on Sunday, while Bafana bowed out of the tournament.