Nigeria will face Egypt and Cameroon will face South Africa in some of the key match-ups for the 2017 Africa Cup of Nations qualifiers following the draw in Cairo.
The group winners and two best second placed teams will join hosts Gabon at the finals.
Defending champions Ivory Coast were drawn with Sudan, Sierra Leone and Gabon in Group I.
Ghana who reached the final of the last AFCON, will take on Mozambique, Rwanda and Mauritius.
Gabon, as hosts, will play in the qualifiers but their games will be treated as friendly matches and they will not earn points.
Nigeria will face Egypt, Tanzania and Chad in Group G while Cameroon, South Africa, Gambia and Mauritania will battle it out in Group M.
THE FULL DRAW
Group A: Tunisia, Togo, Liberia, Djibouti
Group B: Democratic Republic of Congo, Angola, Central Africa Republic, Madagascar
Group C: Mali, Equatorial Guinea, Benin, South Sudan
Group D: Burkina Faso, Uganda, Botswana, Comoros
Group E: Zambia, Congo, Kenya, Guinea Bissau
Group F: Cape Verde, Morocco, Libya, Sao Tome
Group G: Nigeria, Egypt, Tanzania, Chad
Group H: Ghana, Mozambique, Rwanda, Mauritius
Group I: Cote d’Ivoire, Sudan, Sierra Leone, Gabon
Group J: Algeria, Ethiopia, Lesotho, Seychelles
Group K: Senegal, Niger, Nambia, Burundi
Group L: Guinea, Malawi, Zimbabwe, Swaziland
Group M: Cameroon, South Africa, Gambia, Mauritania