Gabon sailed through to the quarterfinals of the African Cup of Nations as the surprise Group C winner on Tuesday, leaving the last two quarterfinal places to be decided on the final day of group matches.
Pierre-Emerick Aubameyang scored the decisive goal in a tight 1-0 win over Tunisia at Stade de Franceville as already-qualified Gabon finished the first round with three wins.
On Wednesday, Ghana, Guinea and Mali all have a shot at the two remaining last eight spots from Group D.
In Group C's other game, Morocco salvaged some pride with a 1-0 win over Niger via a second-half goal from Younes Belhanda. While in Equatorial Guinea, Zambia was distracted ahead of its quarterfinal against Sudan when midfielder Clifford Mulenga was sent home for breaking a team curfew.
Aubameyang's 62nd-minute goal in Franceville, his third in three games, separated Group C's top teams and likely sent second-place Tunisia to a last-eight meeting with title contender Ghana -- which is expected to top Group D after the final day of the group stage.
The Black Stars need just a point against Guinea to confirm their progression as group winner, although Mali and the Guineans have a chance of stopping that from happening.
Gabon has gone against all pre-tournament form by beating Morocco and now Tunisia to make a dream start.
Aubameyang was again the star for the buoyant co-host in Franceville, where Gabon first lady Sylvia Bongo again put her faith in the striker by wearing a bright yellow team shirt with his No. 9 on it.
He decided the battle of the two teams who had already qualified when he slipped a deflected shot past goalkeeper Rami Jeridi.
The stadium -- which was only half full at kickoff -- was packed and celebrating as Gabon's players danced in celebration in the center circle after the final whistle. They were applauded by President Ali Bongo and his wife, who have attended all three of Gabon's games so far.
"Of course it's a motivation for us," captain Daniel Cousin said of the VIP fans. "He's (the president) always supporting us."
At Stade de l'Amitie in Libreville, Morocco ended its disappointing tournament with a 1-0 win over debutant Niger to avoid the humiliation of finishing bottom, scarce consolation for the Moroccans but perhaps enough to save coach Eric Gerets' job.
"They (the Morocco players) stood up and gave a first sign of life today ... and I think a lot of players showed me that we still have a reason to continue our job together," Gerets said.
On Wednesday, back at Stade de Franceville, Ghana will attempt to hold off a Guinea team that faces an all-or-nothing match against Africa's No. 2-ranked team and the four-time champion.
"Against Ghana, it will be like a final," Guinea coach Michel Dussuyer said. "We have respect for them but we want to win, we want to qualify for the quarterfinals."
There could be all sorts of permutations at the end of Group D, but if Mali beats Botswana in Libreville -- as expected -- Guinea has to win against Ghana to have a chance of going through on goal difference.
In Bata, Zambia's build-up to the knockout stage was interrupted as Mulenga was expelled from the team camp for staying out too late with two other unidentified players.
The other two had apologized, a team spokesman said, but Mulenga "showed no remorse" and was sent home.