Debutants Gambia upset Tunisia in another Afcon shock.
Tunisia's penalty curse struck again as defeat by The Gambia left the Carthage Eagles with a daunting last 16 Africa Cup of Nations tie against Nigeria.
Baboucarr Gaye saved Seifeddine Jaziri's penalty as Tunisia missed from the spot for the third successive game.
The Gambia capitalised as Musa Barrow's 25-yard free-kick struck the bar before Ablie Jallow hit an injury-time winner.
The result means Tunisia finish third in Group F while debutants The Gambia, in second, will face Guinea.
Both countries began the game in Limbe knowing that they were already sure of progressing because of results elsewhere.
However, Tunisia knew anything other than victory would likely mean a meeting with Nigeria - the only team with a 100% record at the tournament - in the first round of the knock-out stages.
So, despite a Covid outbreak that left coach Mondher Kebaier only able to name five substitutes with 12 playes unavailable, it was no shock the 2004 champions were the more positive side throughout.
Tunisia's clearest opening saw back-up keeper Gaye dive to his right to thwart Jaziri, who won the spot-kick himself by drawing a foul from the errant foot of The Gambia captain Pa Modou Jagne.
Jaziri became the third different Tunisia player to miss from the spot in the tournament after Youssef Msakni hit the woodwork in the 4-0 win over Mauritania and Wahbi Khazri was denied in the controversial 1-0 defeat by Mali.
Gaye had produced an excellent save to thwart Aissa Bilal Laidouni seconds before the penalty was awarded, and his cause was perhaps helped by the delay leading up to the spot-kick as the Scorpions protested the decision.
That led to ugly scenes after the half-time whistle, with referee Fernando Guerrero Ramirez brandishing a red card to unused Tunisia substitute goalkeeper Farouk Ben Mustapha.
Kebaier's side laboured after the break, perhaps because of their shortage of numbers - with skipper Khazri among the dozen players unavailable - and The Gambia came on strong, as Barrow was unlucky to see his superb set-piece strike cannon off the woodwork.
But, after late confusion that saw Ramirez appear to send off Tunisia's Mohamed Drager, only to instead issue separate yellow cards to the defender and team-mate Hannibal Mejbri, Jallow lashed into the top corner from just inside the area three minutes into stoppage time.
It was another moment to remember for the 23-year-old, who scored his country's first ever Nations Cup finals goal in their opening game win over Mauritania.
At 150th, the lowest ranked team in the competition, The Gambia had also scored a 90th-minite penalty against Mali to draw their second match, and will be hopeful of punching above their weight once again when Tom Saintfiet's side face Guinea on Monday.
Meanwhile Mali secured top spot in Group F at the Africa Cup of Nations with a comfortable 2-0 win over Mauritania, who were already out of the tournament.
The opening goal was scored in the second minute by former Newcastle defender Massadio Haidara.
Mali doubled their tally shortly after half-time when Ibrahima Kone smashed in his third penalty in Cameroon after Moussa Doumbia was brought down.
Sarpsborg striker Kone now has 11 goals in nine international matches.
Victory means Mali win the group on goal difference and will play Equatorial Guinea in the round of 16, while Mauritania exit as the only team at the Nations Cup without a point.