Tunisia all but sealed a place in the Africa Cup of Nations quarter-finals with a last gasp 2-1 win over debutants Niger here on Thursday.
An entertaining encounter was heading for a 1-1 draw until substitute Issam Jemaa bagged the 2004 titleholders the points in the final minute.
For Niger it meant heartache as they had come so close to creating history with their first ever point in the competition.
The win pushed Tunisia on to six points and left Niger footing Group C with Morocco, who are in action against Gabon later.
Tunisia coach Sami Trabelsi rewarded Youssef Msakni, who came off the bench to score the second goal in their opening game against Morocco, with a starting place.
Niger made five alterations from the team swept aside by Gabon, with defender Kofi Dankwae returning from suspension.
The kick off was given against the backdrop of row upon row of empty seats at the L'Amitie stadium, with the plat du jour for the locals - co-hosts Gabon v Morocco - coming later.
Niger started brightly, with the game only seconds old when Maazou Moussa Ouwo latched onto a long ball and charged at the Tunisians goal only for Aymen Mathlouthi to come running out to extinguish any danger.
In the third minute Tunisia took the lead, when Aymen Abdennour found Msakni who deftly rounded several defenders to shoot across the box and into the far corner.
Five minutes later William Tonji Ngounou created history with debutant Niger's first ever Cup goal.
Mathlouthi came off his line to try and catch a high ball, he missed it completely and Ngounou grabbed his opportunity, diving to head into an empty net.
The Niger players ran over to the bench to celebrate the Kodak moment with 'coach' Harouna Doula and 'consultant' Rolland Courbis, although the Frenchman had taken overall command for this match, patrolling the touchline as Douna sat impassively in the dug out.
After the quarter hour the lively Maazou had the small band of Niger fans behind the Tunisia net dreaming of a second goal only for his shot from the right to go over the crossbar.
Another dazzling run by Maazou with Tunisia captain Karim Haggui struggling to keep tabs on him on 30 minutes should have put Niger in front but the Belgian-based striker's angled shot from the left went wide.
Shortly after he found Issoufou Boubacar on the edge of the area but the Phuket midfielder's left-footed shot clipped the near post.
Niger then had legitimate penalty claims when Haggui appeared to bring down Maazou with his arm, but Zambian referee Janny Sikazwe disagreed.
Niger, the moral winners of the opening period, held an impromptu prayer session in the middle of the pitch before heading of for their half-time prep talk presumably delivered by Courbis.
Trabelis brought on Auxerre striker Issam Jemaa for Chermiti at the restart, and then put on Oussama Darragi for Zouhaier Dhaouadi.
Kassaly Daouda was providing a reassuring presence in goal for Niger, coping comfortably as Msakni and Jemaa pressed for the winner.
Niger too had pretensions to take all the points, with Courbis swapping midfielder Tonji for striker Daouda Kamilou but the deadlock remained with a draw a fair result after an entertaining tie.
But Jemaa had the last word, to send Tunisia marching on and Niger needing miracles to prolong their stay in central West Africa.