Africa Cup of Nations holders Cameroon will play Ghana, Benin and Guinea-Bissau in the group stage of the 2019 tournament.
Group D is arguably the pick of the draw, however, with Morocco, Ivory Coast, South Africa and Namibia all in this section.
Cameroon, in Group F, were initially slated to hold the 2019 event after dramatically beating Egypt 2-1 in the 2017 final thanks to Vincent Aboubakar’s late strike.
But they were stripped of hosting duties by the Confederation of African Football due to organisation problems, with Egypt taking over.
Egypt are in Group A with DR Congo, Uganda and Zimbabwe while Senegal have been paired with Algeria, Kenya and Tanzania in Group C during Friday’s draw in front of the pyramids.
Liverpool star Mohamed Salah and his side will open the tournament against Zimbabwe in the capital city of Cairo, where the 2019 Africa Cup of Nations final will also be played.
For the first time the tournament has been expanded to 24 teams, with Burundi, Madagascar and Mauritania all making maiden appearances following the change in format.
Burundi and Madagascar will play each other as they were drawn in Group B, along with Nigeria and Guinea. Mauritania are in Group E with Tunisia, Mali and Angola.
“Group B will be tough,” said Nigeria head coach Gernot Rohr. “Guinea, Madagascar and Burundi are decent sides so we have to prepare well. We plan to play build up games versus Ghana and maybe Senegal.”
The top two teams from each of the six groups will go into the quarter-finals along with the four best third-placed teams. AFCON gets under way on June 21 and the final is set to be played on July 19.
Africa Cup of Nations draw in full:
Group A: Egypt, DR 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