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 take the lead with two goals in a minute, conceded a 90th-minute equalizer and then won a stunning game with a stoppage-time free kick from Bruno-Zita Mbanangoye.
Bongo was slumped in his chair in Libreville, then hugging officials and jumping with joy. Fans streamed onto the pitch in wild celebrations at one point, swallowing up Gabon's heroes and even flooring forward Eric Mouloumbui in the chaos.
Gabon's unlikely win also saw Tunisia qualify from Group C following its earlier 2-1 victory against Niger. The Tunisians stole their own 90th-minute winner through substitute Issam Jemaa to begin a memorable night in the Gabonese capital.
Ghana and Mali surely can't produce anything like it when they meet in probably the highest-profile clash of the African Cup so far on Saturday in Group D in Franceville.
Gabon coach Gernot Rohr and Morocco boss Eric Gerets were spotted peeking out from the players' tunnel as substitute Jemaa's last-gasp goal gave Tunisia its late win over tournament debutant Niger, which pushed the 2004 champion all the way before falling at the very end.
Rohr smiled ruefully and shook his head as Tunisia temporarily took control of the group, not knowing his team was about to produce something even better.
With Morocco playing for its survival against a co-host urged on again by a packed stadium, captain Houssine Kharja settled its nerves with a slick finish in the 25th minute for 1-0.
The game burst to life in the 77th when Gabon's Pierre-Emerick Aubameyang scored from a volley from near the penalty spot and veteran striker Daniel Cousin — who was on as a substitute — poked home barely a minute later.
Morocco was thrown a lifeline when Kharja converted a high-pressure spot kick in the last minute of regular time when Charly Moussono blocked Younes Belhanda's shot with his arm, but that lifeline was cruelly yanked away by Mbanangoye's curling right-footed free kick into the top left corner in the fifth minute of added time.
Having been first subdued and then suddenly ecstatic, Gabon's president could only stand and stare ahead with a beaming smile on his face at the very end.
The near 40,000 home fans at Stade de l'Amitie, meanwhile, erupted as Gabon made the quarterfinals for only the second time in its history.
"We got a result and now we have qualified but we haven't won anything just yet," said coach Rohr, who was characteristically calm throughout as chaos reigned around him. "We have Tunisia next and it'll be great if we finish top of the group, it will not be easy. Today was a hard match and let us savour this feeling."
Gerets had appeared resigned to the sensational swing in fortunes, biting his lip and standing dead still on the sidelines looking straight ahead after Cousin put the co-host 2-1 up and Gabon's players and fans went wild.
His team found the spirit to claw its way back, only to slip up again at the death, but Morocco had tried to protect its slim lead through most of the second half and ultimately paid a high price in a desperate finish.
"You have to look at the truth in front of you and not hide from it," Gerets said. "Now we have been eliminated and we played a second half which was unbecoming of the national team of Morocco."
On Saturday, Ghana and Mali will both be spurred on by the fate that has befallen Morocco and another highly rated team, Senegal, which also lost its first two games to crash out of an African Cup dominated so far by the underdog.
A win for one of the two favourites will send the other to a nervous final group game, with Guinea and Botswana hoping to be in a position to capitalize.
Follow Gerald Imray at http://twitter.com/GeraldImrayAP