Egypt will be among the third seeds when the African Cup of Nations draw takes place in Gabon capital Libreville on 19 October, the Confederation of African Football (CAF) announced on Tuesday.
The Pharaohs were seeded third along with Cameroon, Senegal and Morocco, meaning the four continent heavyweights will not face each other in the group stage of the biennial tournament.
Some Egyptian fans were worried the team would be seeded fourth after they failed to qualify for the 2012, 2013 and 2015 Nations Cup editions.
However, the record seven-time African champions, who won three titles in a row from 2006 to 2010, could now get a favourable draw.
The top seeds are Gabon, Ivory Coast, Ghana and Algeria.
"The seedings was determined taking into account the performance of the qualified teams during the following competitions: AFCON final tournaments (2012, 2013, 2015), AFCON qualifiers (2013, 2015, 2017), FIFA World Cup (2014) and FIFA World Cup qualifiers (2014)," CAF said in a statement.
Egypt topped a three-team group in the Nations Cup qualifiers with 10 points, five ahead of second-placed Nigeria and nine clear of Tanzania.
The Nations Cup will take place in Gabon from 14 January to 5 February next year.
The full pots:
Pot 1: Gabon, Ivory Coast, Ghana, Algeria
Pot 2: Tunisia, Mali, Burkina Faso, DR Congo
Pot 3: Cameroon, Senegal, Morocco, Egypt
Pot 4: Togo, Uganda, Zimbabwe, Guinea Bissau
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)