Gambia substitute Ablie Jallow scored a stunning goal deep in stoppage time to earn his team a shock 1-0 win over Tunisia at the Africa Cup of Nations on Thursday and continue the upset results at the tournament.
His left-foot shot four minutes into added time flew into the top corner to lift the debutants up to an impressive seven points from their three group matches.
Gambia finished behind Mali in the Group F standings on goal difference with Tunisia third on three.
Avoiding defeat by Tunisia meant Gambia will not face a last-16 clash against Nigeria, who will play the Tunisians.
Tunisia advanced as one of the four best third-placed teams but had defender Mohammed Drager sent off late in the game and reserve goalkeeper Farouk Ben Mustapha was also handed a red card for his part in a touchline fracas as the teams went into the tunnel for halftime.
They had come into the game with 10 players in isolation after returning positive COVID-19 tests and also squandered a fourth successive penalty at the finals.
Tunisia had found it difficult to break down a well drilled Gambia defence but five minutes before halftime Gambia skipper Pa Modou Jagne clipped the heels of striker Seifeddine Jaziri, who fell down dramatically and was awarded a penalty.
Jaziri got up to take the kick but his powerful strike was saved by Gambia goalkeeper Baboucar Gaye, winning only his second cap.
Tunisia dominated possession but had rare shots on target while Gambia got progressively more ambitious.
Musa Barrow struck a powerful cross against the crossbar -- the third time he has done that at this tournament -- before Jallow's thunderbolt snatched victory with virtually the last kick of the game.
"We are very proud, we were very disciplined, it's an amazing result to be beat Tunisia, finish with seven points and go to the second round. We could not have wished for more," said Gambia coach Tom Saintfiet.