Ex- Continent's Best Player of the Year Victor Osimhen was instrumental in his team build a 3-0 lead, before the Super Eagles were forced to defend resolutely for a narrow win.
The three-time champions weathered a stunning comeback attempt from Tunisia to advance to the knockout stage of the 2025 Africa Cup of Nations taking place in the host nation.
Jose Peseiro's side seemed to be in complete control in their Group C clash in Fes, holding a three-goal lead with just 17 minutes left courtesy of goals from their attacking trio.
However, a Tunisian defender pulled one back with a powerful header from a Hannibal Mejbri set-piece, sparking hopes of a recovery.
The drama escalated when the North Africans were given a spot-kick after a video assistant referee review identified a handling offense by the Nigerian defender. The left-back calmly slotted home in the 87th minute to set up a nail-biting conclusion.
The Carthage Eagles came agonizingly close from a stunning equalizer in stoppage time, with their skipper directing a chance just past the post before Ismael Gharbi sent a half-volley wide of the goal frame.
The victory ensures that Nigeria, winners of the tournament on three previous occasions, move to six group points and are assured first place in Group C with a match still to be contested.
In the next round, they will face a third-placed side from one of Group A, B or F.
Meanwhile, Tunisia stay on 3 points, with the East African teams locked on a single point each after playing out a one-all stalemate earlier on Saturday.
The final group matches will see Nigeria stay in Fes to play Uganda on Tuesday, while the Eagles of Carthage return to the capital to confront Tanzania.
Ali Abdi drilled the ball from the penalty spot to offer Tunisia hope of snatching a point.
Nigeria, finalists in the previous edition, are the second nation after Egypt to reach the next phase, but their manager and supporters will certainly be feeling relieved.
What seemed set to be a comfortable last period morphed into a tense conclusion.
Victor Osimhen had a effort ruled out for offside before opening the scoring right before half-time, precisely placing a glancing effort into the far post from an Ademola Lookman cross.
The advantage was extended soon in the second half when the Leicester City midfielder rose highest to thump in a powerful nod from a set-piece corner.
The number 9 then set up Lookman for the third goal, only for the defender to steer a powerful header past the Nigerian shot-stopper to initiate the comeback.
The pivotal moment came when a high ball struck the forearm of the full-back, with referee Boubou Traore pointing to the spot after reviewing the VAR monitor.
Although Ali Abdi's confident conversion, Tunisia ultimately fell short of completing a remarkable recovery.
Tunisia's destiny remains in their control; a point against Tunisia will be enough to see them through, and manager Sami Trabelsi will be keen to prevent a recurrence of the past early elimination that led to his previous resignation.
Aria Vance is a savvy shopping expert and deal hunter, dedicated to uncovering the best VIP discounts and sharing money-saving tips with readers.