The 2019 Africa Cup of Nations qualifying draw made in Libreville Thursday pitted Nigeria against South Africa in one of the 12 groups and Tunisia against Egypt in another.
Nigeria and South Africa are in Group E with Libya and the Seychelles while Tunisia and Egypt are in Group J with Niger and Swaziland.
Both Nigeria and South Africa failed to reach the 2017 Cup of Nations tournament, which kicks off in Gabon Saturday with a fixture between the host country and Guinea-Bissau.
Nigeria lost out to Egypt after taking only one point from the two matches between countries who have won 10 of the previous 30 competitions.
South Africa held eventual group winners Cameroon twice, but finished an embarrassing third after losing and drawing against minnows Mauritania.
Both blockbuster pairings are repeats of 2015 qualifiers with Nigeria and South Africa drawing twice and Tunisia defeating Egypt home and away.
Ghana and Kenya are in Group F with Ethiopia and Sierra Leone and the Democratic Republic of Congo and Congo Brazzaville share Group G with Zimbabwe and Liberia.
Group L comprises decades-old east African rivals Uganda and Tanzania plus Cape Verde and Lesotho.
There will be three two-leg preliminary ties during March involving the six lowest ranked sides with the overall winners securing places in the group phase.
One round of mini-league fixtures are scheduled for 2017 and five for next year with the 12 group winners and the best three runners-up joining hosts Cameroon in the finals.
Group winners and best three runners-up qualify for tournament with hosts Cameroon
Cameroon will compete in Group B and points awarded in their matches. If Cameroon win group, the runners-up will qualify; if they finish runners-up, the winners will qualify; if they finish third or fourth, the winners will qualify and the runners-up will compete for one of the three additional places
Match days:
2017
June 5-13
2018
Mar 19-27, Sept 3-11 (two), Oct 8-16, Nov 5-13