Ramadan Sobhi's goal sealed success for hosts Egypt at the CAF Under-23 Africa Cup of Nations ©CAF

Hosts Egypt beat Ivory Coast in the final of the Confederation of African Football Under-23 Africa Cup of Nations in Cairo after South Africa had joined the two teams in qualifying for the Tokyo 2020 Olympic Games.

Captain Ramadan Sobhi scored the decisive goal for Egypt with six minutes of extra time left, securing a 2-1 win at Cairo International Stadium.

Karim El Eraki's opener in the 37th minute put Egypt on the brink of victory in normal time, but substitute Aboubacar Doumbia brought Ivory Coast level in the dying moments to force the additional half hour.

Egypt's win secures them their first title in the third edition of the quadrennial tournament.

The home nation won all five of their matches.

Egypt took the lead, which they maintained until half-time, when Sobhi found his way past his marker down the left side to deliver a cross that El Eraki directed home.

After the break, the Ivorians threw everything in attack, but had to wait until the last minute to grab the equaliser.

Doumbia, who had barely been on the pitch for a minute, received a cross to score past Egypt goalkeeper Mohamed Sobhy and send the game to extra time.

Both teams had their chances in extra time, before Egypt’s talisman Sobhi won it for the hosts. 

Substitute Ahmed Yasser Rayyan weaved past his marker to send a shot that was rebounded from Ivory Coast goalkeeper Eliezer Ira Tape, and Sobhi was the fastest to the ball to score the winner.

South Africa joined Egypt and Ivory Coast in qualifying for Tokyo 2020 after defeating Ghana in the third-place play-off.

South Africa prevailed 6-5 on penalties following a 2-2 draw after normal time.

It is the third time the country has qualified for the Olympic men’s football tournament, having also competed at Sydney 2000 and Rio 2016.

Ghana’s Habib Mohammed wrongly turned the ball into his own net on the quarter-hour mark to give South Africa an early lead.

Evans Mensah restored parity five minutes after half-time, receiving the ball outside the penalty area and sending a curling shot to beat goalkeeper Mondli Mpoto.

But South Africa restored their lead just after the hour mark thanks to a smart finish from Kamohelo Mahlatsi, who had only been on the pitch for two minutes when he received a pass from Lyle Foster to slot home.

Just when it looked all set for a South Africa win, Ghana scored a late equaliser.

Mensah rounded his marker and sent a cross that fell to substitute Samuel Obeng, who made no mistake to score and level the match again five minutes from time.

The game was sent directly to a penalty shootout to determine the winner.

The shootout saw both sides miss twice, before Mpoto saved Emmanuel Cudjoe’s effort to send his side to Tokyo 2020.