Former champions Ghana and Nigeria have been handed difficult assignments for May's African under-17 Championship following the draw on Thursday at Caf headquarters in Cairo.
Ghana have been drawn in Group A alongside Burkina Faso, Mali and their Gambian hosts.
Nigeria, meanwhile, must face South Africa, the Ivory Coast and Zimbabwe in Group B.
The Golden Eaglets will take on South Africa in their opening match for the sixth edition of the competition.
In the draw supervised by the president of Caf, Issa Hayatou, the two-time African champions Ghana were also given a challenging task as they play Mali in their opening Group A match.
Only the top two in each group progress to the semi-finals.
All four semi-finalists qualify for the Fifa World under-17 Championship to be held in Peru in September.
Ghana is the only country to have won the African under-17 Championship twice, having triumphed in 1995 and 1999.
Egypt, Nigeria and Cameroon, meanwhile, have all won the competition once.
Group A The Gambia Burkina Faso Mali Ghana
Group B Nigeria South Africa Ivory Coast Zimbabwe