1 of 8
Francois Mori, Associated Press
Morocco'S Houssine Kharja reacts during their African Cup of Nations Group C soccer match against Gabon at Stade De L'Amitie in Libreville, Gabon, Friday, Jan. 27, 2012.

FRANCEVILLE, Gabon — Gabon snatched a place in the African Cup of Nations quarterfinals and eliminated Morocco after a dramatic 3-2 win on Friday in the craziest game yet at a highly unpredictable tournament.

Gabon President Ali Bongo lived every moment of his team's rollercoaster ride at Stade de l'Amitie as it came from 1-0 down to lead with two goals in a minute, conceded a 90th-minute equalizer and then won a stunning game with a stoppage-time free kick.

Bongo was slumped in his chair in Libreville, then hugging officials and jumping with joy.

Tunisia also qualified from Group C after Gabon's unlikely 2-1 victory against Niger with its own 90th-minute winner.

Ghana and Mali surely can't produce anything like it when they meet Saturday in Group D.