Ex- African Footballer of the Year Victor Osimhen was instrumental in Nigeria establish a commanding advantage, before the Super Eagles were compelled to defend resolutely for a narrow victory.
Nigeria survived a dramatic comeback attempt from their opponents to progress to the knockout stage of the Afcon tournament being held in Morocco.
The Super Eagles appeared to be in complete control in their pool clash in Fes, enjoying a 3-0 cushion with just 17 minutes remaining thanks to strikes from their attacking trio.
However, a Tunisian defender pulled one back with a powerful header from a Hannibal Mejbri free-kick, sparking hopes of a turnaround.
The tension intensified when Tunisia were awarded a late penalty after a VAR review spotted a handling offense by Bright Osayi-Samuel. Ali Abdi converted in the dying stages to create a nail-biting conclusion.
Tunisia came agonizingly close from a stunning equalizer in stoppage time, with captain Ferjani Sassi directing a chance narrowly wide before Ismael Gharbi sent a half-volley past the goal frame.
Clinching Top Spot
This result ensures that Nigeria, winners of the competition on three past instances, advance to 6 group points and are guaranteed first place in their pool with one game still to play.
For the round of 16, they will meet a third-placed team from either Group A, B or F.
Meanwhile, Tunisia remain on 3 points, with Uganda and Tanzania tied on a single point after registering a 1-1 draw earlier on Saturday.
The final pool fixtures will see the group leaders remain in the city to play Uganda on Tuesday, while Tunisia return to the capital to confront Tanzania.
A Nervy Conclusion
Ali Abdi smashed the ball from 12 yards to offer his team a glimmer of hope of earning a point.
The Super Eagles, runners-up in the 2023 tournament, become the next nation after Egypt to qualify for the next phase, but their manager and supporters will certainly be breathing a sigh of relief.
What seemed set to be a straightforward 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 the interval, precisely placing a header into the bottom corner from an Atalanta winger delivery.
The lead was extended soon in the second period when Wilfred Ndidi rose highest to power home a header from a Lookman kick.
Osimhen then set up Lookman for the seemingly decisive goal, before Montassar Talbi to steer a powerful header past the Nigerian shot-stopper to begin the fightback.
The pivotal moment came when a high ball hit the arm of Bright Osayi-Samuel, with referee Boubou Traore pointing to the spot after consulting the VAR monitor.
Although the defender's confident conversion, the 2004 champions ultimately came up just short of pulling off a remarkable comeback.
Tunisia's destiny remains 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 repeat of the past early elimination that resulted in his departure.