Nigeria have failed to qualify for the 2017 Africa Cup of Nations after falling to a 1-0 defeat in Egypt in their Group G match on Tuesday.
With just one game remaining and only the group winners to qualify, Nigeria cannot make up their five-point deficit to table-toppers Egypt.
Ramadan Sobhy’s 65th-minute winner puts Egypt on the verge of qualification.
Egypt face Tanzania in June and will book their place in Gabon with any result better than a 3-0 defeat.
Nigeria won the Nations Cup in 2013 but have now suffered back-to-back eliminations in qualifying.
They threw everything forward to find an equaliser on Tuesday and came close when West Ham winger Victor Moses crashed a shot against the post in the 84th minute.
The match in Alexandria became a virtually all-or-nothing tie for Nigeria after Chad withdrew from the group on Sunday, citing financial difficulties, and all results from their matches were erased.
That left only three teams in Group G and in accordance with the rules of the Confederation of African Football only the winner would qualify for the finals.
Egypt have seven points with one match to play, against bottom club Tanzania, who have only one point but two games remaining.
To have any chance of qualification Tanzania would need to beat Egypt by a better scoreline than the 3-0 defeat they suffered in Egypt last June because head-to-head records would come into effect if the sides finished level on points.
Tanzania would still have to beat Nigeria in their final match in September.