Hosts Egypt were handed a favourable draw for the 2019 Africa Cup of Nations finals on Friday, but continental powerhouses Morocco, Ivory Coast and South Africa were placed together in a tough group.
The draw for the expanded 24-team tournament, that runs from June 21 to July 19, was staged against the spectacular backdrop of the Sphinx and Pyramids on the Giza Plateau in Cairo.
Egypt will take on the Democratic Republic of Congo, Uganda and Zimbabwe in Group A, opening their campaign against the latter at the Cairo International Stadium.
The top two teams in each of the six groups advance to the second round, along with the four best third-placed sides.
Group D features Morocco, Ivory Coast, South Africa and Namibia, and should be keenly contested between the first three sides.
It once again pits Morocco coach Herve Renard against the Ivorians with whom he lifted the trophy in 2015.
The teams also met in Gabon two years ago where Morocco beat the west Africans in their final group match to progress to the knockouts at their opponents' expense.
Nigeria take on Guinea in Group B, as well as first-time qualifiers Madagascar and Burundi, and the Super Eagles will be heavy favourites to finish top.
Kenya are back at the finals for the first time in 15 years, while Tanzania last appeared in 1980, and both those sides will do well to advance from Group C that also includes Senegal and Algeria.
Tunisia and Mali look favourites in Group E, which includes Mauritania, another first-time qualifier, as well as Angola.
Group F is harder to call with holders Cameroon drawn alongside Ghana, Benin and Guinea-Bissau.
Egypt stepped in as 2019 hosts after Cameroon were stripped of the right to hold the event in late November over concerns at the slow pace of their preparations.
The North African nation is also the most successful in Cup of Nations history having won seven titles in the past.
The shift of dates for the tournament to the European summer will alleviate the club-versus-country battles that have marred previous editions when it was held earlier in the year.
The six groups were drawn as follows:
Group A: Egypt, Democratic Republic of Congo, Uganda, Zimbabwe
Group B: Nigeria, Guinea, Madagascar, Burundi
Group C: Senegal, Algeria, Kenya, Tanzania
Group D: Morocco, Ivory Coast, South Africa, Namibia
Group E: Tunisia, Mali, Mauritania, Angola
Group F: Cameroon, Ghana, Benin, Guinea-Bissau