Bruno-Zita Mbanangoye scored from a stoppage-time free kick in Gabon's 3-2 win over Morocco on Friday to put the co-hosts into the African Cup of Nations quarterfinals and send the Group C favorite crashing out of the tournament.

Mbanangoye's curling right-footed effort decided a hugely dramatic game in which Gabon had hit back from 2-1 down with two goals in a minute before conceding a 90th-minute equalizer from a penalty.

But Gabon wouldn't give up, and Mbanangoye's strike in the fifth minute of stoppage time ensured a barely believable finish.

Tunisia also progressed to the last eight after its earlier win over Niger.