Ghana made certain of their progress into the quarter-finals of the African Cup of Nations as they held outgoing Guinea to draw, while in the other Group D match Mali came from behind to beat minnows Botswana in Libreville and set up a quarter-final against co-hosts Gabon.
In Franceville, a screamer from Emmanuel Agyemang-Badu gave Ghana the lead in the 26th minute, and although Guinea levelled on the stroke of half-time through a fortuitous strike from Abdoul Camara, they could not find the goal they needed to go through.
Their challenge was only made harder by the 70th minute dismissal of Mamadou Bah.
Guinea, needing a victory to have any chance of progression, started in determined fashion with Ismael Bangoura having early sights of goal but unable to trouble Adam Larsen.
They wanted a penalty in the 11th minute when Larsen came to take the ball at the feet of Ibrahima Traore, but the referee said the goalkeeper took the ball cleanly while replays suggested otherwise.
They had the ball in the net in the 25th minute when Traore fired home from a through ball from Pascal Feindouno, but he was correctly called offside.
It was just moments later when Ghana, second best to this point, took the lead with a superb goal from Badu, who flicked the ball up before lashing the ball home from the outside of the area.
The goal rather dimmed Guinea spirits, but Bangoura went close in the 37th minute with a shot Larsen had to palm away for a corner.
Samuel Inkoom went close to a second for Ghana as he lashed just inches wide, while at the other end Camara got himself into a fine position only to scuff his shot.
Asamoah Gyan fired into the side-netting for Ghana, and then moments later Camara made up for his earlier miss when his looping cross from the left wrong-footed the goalkeeper and found the far corner of the net.
Larsen denied Bangoura early in the second half but chances were in short supply, and Guinea's problems grew when Bah earned a second yellow card in quick succession in the 70th minute.
With news coming through that Mali were ahead in the other game, making this result academic, the pace slowed.
Prince Tagoe had a late chance for Ghana, but they had already done enough.
In Libreville, Botswana took a shock lead shortly after half-time through Mogakolodi Ngele but Garra Dembele soon equalised and Seydou Keita curled home a sumptuous winner.
Ngele fired the Zebras into the lead with his first international goal five minutes after the restart, timing his run perfectly to meet Moemedi Moatlhaping's cross and sidefoot firmly home.
But Mali levelled six minutes later when Marumo parried Maiga's header but Dembele emphatically hammered home the rebound from close range.
They almost had a wonderful second when replacement right-back Ousmane Coulibaly slalomed through the defence and saw his shot rebound off the crossbar, with Maiga and Dembele combining to make a mess of the rebound.
The impressive Ngele turned and shot just wide at the other end before Keita curled home Mali's second. The Barcelona midfielder exchanged passes with substitute Cheick Diabate, just on for Dembele, and curled a measured first-time effort past Marumo with his left foot.
It remained 2-1 and, after a nervous wait for confirmation of Guinea's result, the Eagles' progression was confirmed.