Despite putting up an unconvincing performance on Monday, the Nigerian Super Eagles held on to beat Guinea Bissau 1-0 to qualify for AFCON knockout stage.
The Eagles ended Group A second with Equatorial Guinea topping the group.
Opa Sangante of Guinea Bissau scored an own goal to give the Eagles the lead in the 36th minute of the match.
Sangante, who tried to clear a cross into the six-yard sent the ball behind his own keeper to give Nigeria 1-0 lead.
Four minutes into first half added time, Victor Osimhen squandered a promising opportunity as he latched on to a perfect cross from the wing.
He produced a bullet header from around the penalty spot which went just wide of the right post.
In the 57th minute, Nigeria appeared to have doubled their advantage as Osimhen put the ball in the net but referee Bouchra Karboubi ruled out the goal for a handball.
In the 78th minute, a great ball was played in from Ola Aina. Osimhen should really have done better with a close-range header, but he headed it a whisker wide of the left post.
In the 83rd minute, Franculino scored a great goal, but it was ruled out for offside.
A minute later, the Eagles scored another goal but the referee ruled it offside.
In the other game in the group, Ivory Coast slipped to the brink of a humiliating exit from the Africa Cup of Nations as the hosts suffered a 4-0 thrashing by Equatorial Guinea in their final Group A game in Abidjan.
Emilio Nsue scored a double to follow up his hat-trick against Guinea-Bissau as Equatorial Guinea finished top of the group ahead of Nigeria on goal difference.
Ivory Coast have only failed to get out of the group phase once in the previous nine editions of the tournament, in 2017.
The two-time champions will have to endure a nervy wait to find out if they will go through to the last 16 as one of the four best third-placed sides.