Former Continent's Best Player of the Year Victor Osimhen was instrumental in Nigeria establish a commanding lead, before the Super Eagles were forced to defend resolutely for a narrow win.
Nigeria survived a stunning late rally from Tunisia to progress to the knockout stage of the 2025 Africa Cup of Nations taking place in the host nation.
Jose Peseiro's side seemed to be cruising in their Group C clash in Fes, enjoying a three-goal cushion with only 17 minutes remaining thanks to goals from their attacking trio.
However, a Tunisian defender pulled one back with a powerful header from a Manchester United midfielder free-kick, sparking hopes of a recovery.
The tension escalated when Tunisia were given a spot-kick after a VAR review spotted a handball by Bright Osayi-Samuel. The left-back converted in the dying stages to create a frantic finale.
The Carthage Eagles came agonizingly close from a last-gasp leveler in added time, with their skipper directing a chance narrowly wide before Ismael Gharbi guided a bobbling volley wide of the upright.
This result means that Nigeria, champions of the tournament on 3 previous occasions, move to six points and are assured top spot in their pool with one game left to play.
For the round of 16, they will meet a best third-place team from one of Group A, B or F.
In the other match, the 2004 champions stay on three group points, with Uganda and Tanzania locked on a single point after playing out a 1-1 draw in the day's other fixture.
The final pool fixtures will see Nigeria stay in the city to play Uganda on the next matchday, while the Eagles of Carthage travel back to the capital to face the Taifa Stars.
Ali Abdi drilled the ball from the penalty spot to give Tunisia a glimmer of hope of earning a point.
The Super Eagles, runners-up in the 2023 edition, are the second nation after the Pharaohs to reach the knockout stage, but coach Eric Chelle and supporters will undoubtedly be feeling relieved.
What seemed set to be a comfortable last period morphed into a tense affair.
The prolific striker had a goal ruled out for offside before opening the scoring on the stroke of half-time, expertly guiding a glancing effort into the bottom corner from an Atalanta winger cross.
The lead was extended soon in the second period when the Leicester City midfielder rose highest to thump in a header from a Lookman corner.
The number 9 then turned provider his teammate for the seemingly decisive goal, only for Montassar Talbi to steer a powerful header past goalkeeper Stanley Nwabali to begin the fightback.
The pivotal incident arrived when a high ball struck the arm of Bright Osayi-Samuel, with referee Boubou Traore awarding a penalty after reviewing the VAR monitor.
Despite Ali Abdi's successful penalty, the 2004 champions in the end came up just short of completing a remarkable recovery.
Tunisia's destiny is still in their own hands; a draw against Tanzania will be sufficient to see them through, and manager Sami Trabelsi will be keen to avoid a recurrence of the past group-stage exit that resulted in his previous resignation.
A seasoned casino gaming analyst with over a decade of experience in slot machine mechanics and player strategy optimization.