Ghana failed to reach the Africa Cup of Nations for the first time since 2004 after drawing with Angola 1-1 in qualifying on Friday.

The Black Stars needed a win in their penultimate group game to keep alive their slim hopes of qualifying for the tournament in Morocco next year.

Ghana, four-time African champions, have played in 24 editions of the tournament. Only seven-time champions Egypt (26) and defending champions Ivory Coast (25) have appeared in more.

Already-qualified Angola made the better start in front of the home fans in Talatona, but Ghana veteran Jordan Ayew opened the scoring for the visitors with a brilliant free kick from distance in the 18th minute.

M’Bala Nzola had a chance to equalize with a penalty only for Ghana keeper Abdul Manaf Nurudeen to save his spot kick.

The home team kept pushing however, and Felicio Milson set up Zini to equalize in the 64th.

Ghana remained bottom of qualifying Group F with just three points from five games. They needed two wins from its final two games while hoping group rivals Sudan (seven points) lost both of their games.

Niger had earlier done the Black Stars a favor by beating Sudan 4-0. Ghana next plays Niger (four points) on Monday, when Niger can qualify as group runners-up behind Angola (13 points) as long as Angola beats Sudan in their final group game. Niger have a better goal difference than Sudan.

Former Hertha Berlin winger Myziane Maolida scored in the last minute for Comoros to qualify with a 2-1 win over Gambia. It’s just the second time the island nation has qualified for the Cup of Nations.

Zambia, Mali, and Zimbabwe secured their qualification for the 2025 Cup of Nations earlier Friday, while Nigeria, Tunisia, South Africa, Uganda, Equatorial Guinea and Gabon clinched their spots on Thursday.

Victor Osimhen’s late goal was enough for Nigeria to progress with a 1-1 draw against Benin.

Morocco, Burkina Faso, Egypt, Algeria, Congo, Cameroon, Senegal, Ivory Coast, Equatorial Guinea and Angola were already qualified before this round of games.

There are still six places available in the 24-team tournament with qualifying continuing through Tuesday.

Information from The Associated Press contributed to this report.