William Paul Ekong of Nigeria celebrates goal, teammate Moses Simon joins in celebration (l) during the 2019 Africa Cup of Nations Finals Quarterfinal football match at the Cairo International Stadium, Cairo, Egypt on 10 July 2019.
CAIRO - Nigeria sneaked into the Africa Cup of Nations semi-finals when defender William Troost Ekong scored with one minute remaining to give them a 2-1 win over a gallant South Africa as the tournament served up more drama on Wednesday.
Troost Ekong, left unmarked, turned the ball in with his knee from a corner to leave the South Africans heart-broken after they had fought their way back into the match which seemed to be out of their reach.
Samuel Chukwueze, recalled to the side after missing the previous round, put the Super Eagles in front when he scored at the second attempt in the 27th minute.
Nigeria stayed in control, missed chances and paid the price when Bongani Zungu headed an equaliser in the 71st minute with South Africa's first shot on target.
The goal was initially ruled offside but then awarded after a VAR check -- the first major intervention by technology since it was introduced for the quarter-finals.
"We had a plan, it was working, we scored, we failed to score a second goal," said Nigeria coach Gernot Rohr. "What I like in my team is that they never give up, they are never down, and they came back in the last minute, so this can take us very far."
Nigeria, who will meet Ivory Coast or Algeria in the last four, went ahead with the first really dangerous attack of the match.
Alex Iwobi burst down the left and pulled the ball back into the area to Chukwueze whose first effort was blocked by a defender but scored after it rebounded back to him.
Chukwueze, overlooked for the 3-2 last 16 win over Cameroon, was a constant menace down the right and created another chance after skipping past his marker but Dean Furman made a timely interception to deny him.
Nigeria looked too strong all-round for their rivals and nearly extended their lead early in the second half with a 25-metre free kick from Oghenekaro Etebo but Ronwen Williams turned it on the bar.
WATCH: A slice of Nigerian culture
South Africa, who sensationally knocked out hosts Egypt in the previous round, struggled to get a look-in but the Super Eagles repeatedly failed to turn the mazy runs of Ahmed Musa and Chukwueze into goals.
Then, from out of the blue, South Africa equalised as Percy Tau lofted a free kick into the area, it was flicked on and superbly headed in by Zungu. It was initially disallowed but then given by a VAR check that took nearly three minutes.
Extra-time was looming until Nigeria won a corner on the left, Williams missed the ball and Troost Ekong prodded it home.
"It's difficult when you've lost the game in the dying minutes, it's difficult to find positives," said South Africa coach Stuart Baxter. "I'm sure in one week's time. I will find positives but now it's very difficult."