Nigeria qualified for their first Africa Cup of Nations since winning the tournament in 2013 after drawing 1-1 with South Africa in Johannesburg.
The draw guarantees the three-time African champions a place in Cameroon with a round of matches still to play.
Despite conquering Africa in 2013, the Super Eagles surprisingly failed to qualify for the 2015 and 2017 finals.
Nigeria led through an own goal before South Africa’s Percy Tau produced a moment of magic to tee up Lebo Mothiba.
The draw takes the Super Eagles to 10 points in Group E, one ahead of South Africa and three more than Libya who roared back into contention when thrashing the Seychelles 8-1 in Victoria.
Libya will now qualify for the Nations Cup if they beat Bafana Bafana in their final match next March.
Nigeria, meanwhile, finish their campaign at home to the Seychelles who have conceded 22 goals in their five group games and prop up the table with one point.
The Super Eagles’ previous Nations Cup triumphs came in 1980, 1994 and 2013.