Harambee Stars have been pooled in Group F of the 2019 Africa Cup of Nations qualifiers according to a draw conducted on Thursday in Gabon.
They will play against Ghana, Ethiopia and Sierra Leone, who are members of the same group, as from June.
Harambee Stars gains in latest Fifa rankings
Neighbours Uganda and Tanzania have been pooled together in Group L alongside Lesotho and Cape Verde. Tunisia, Egypt, Swaziland and Niger are in Group J while Zambia, Namibia, Mozambique and Guinea Bissau will battle it out in Group K.
Nigeria will face rivals South Africa, Libya and Seychelles in the qualifying race for the 32nd competition to be held in Cameroon. The Super Eagles will be hoping to stage a return to the tournament after back-to-back blackouts in Equatorial Guinea 2015 and Gabon 2017.
South Africa denied Nigeria a place in the 2015 edition following their 2-2 draw in the last game of the qualifying series at the Godswill Akpabio International Stadium.
Meanwhile, Sao Tomé, Madagascar, Comoros, Mauritius, Djibouti and South Sudan will have to take part in March preliminaries from which three nations will advance to the Group stage.