Mali came from behind to beat Africa Cup of Nations minnows Botswana 2-1 in Libreville and set up a quarter-final against co-hosts Gabon.
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.
All eyes then turned to Guinea's clash with Ghana in Franceville, where the Black Stars held on for a draw to ensure Mali qualified at Guinea's expense.
Ngele fired well over from 20 yards early on before Mali missed a glorious chance, Modibo Maiga cutting the ball back to Dembele who headed over with the goal gaping.
The pitch was cutting up badly and an enormous divot in Botswana's left-back area was almost enough to trip up Mali's Abdou Traore.
Cedric Kante fouled Jerome Ramathlakwana to end a fluent Botswana move and following the resulting free-kick, defender Ndiapo Letsholathebe's backheel played in Lemponye Tshireletso, but he scuffed his shot wide.
Maiga's header was well off target and Traore's drive was blocked by Mogogi Gabonamong.
Drissa Diakite's cross almost caused problems but keeper Modiri Marumo managed to tip the ball away and an underwhelming first half ended goalless.
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.
Bayern Munich will play for Champions League glory on Saturday, May 19. Get your jersey
Price: $79.99 Buy at World Soccer ShopDrogba scored in regulation and knocked in the final PK as Chelsea wins Champions League.
Price: $117.44 Buy at World Soccer ShopChelsea is looking to win their first Champions League title on Saturday, May 19.
Price: $84.99 Buy at World Soccer ShopThe latest in the adidas Predator series will get the job done at your local soccer field.
Price: $219.99 Buy at World Soccer ShopJuventus won the Scudetto with an impressive unbeaten run in Serie A.
Price: $21.99 Buy at World Soccer ShopGet the official Champions League ball from the Munich Final. It's what the players use!
Price: $149.99 Buy at World Soccer ShopManchester City won their first English league title since 1968 on Sunday. Get in the Gear.
Price: $79.99 Buy at World Soccer ShopWear official gear of the 2011/12 Champions League winners, Chelsea.
Price: $21.99 Buy at World Soccer ShopTop off your Chelsea look with an official Chelsea cap.
Price: $21.99 Buy at World Soccer Shop
Premier League Table
Premier League Fixtures
Premier League Results
EPL Top Scorers
Soccer365's Premier League stats provided by Fox Soccer. Check out the EPL games on the TV Schedule for this week.
Serie A Table
Serie A Results
Serie A Fixtures
Serie A Top Scorers
Soccer365's Serie A stats provided by Fox Soccer. Check out the Serie A games on the TV Schedule for this week.
La Liga Table
La Liga Results
La Liga Fixtures
La Liga Top Scorers
Soccer365's La Liga stats provided by Fox Soccer. Check out the Fox Soccer TV Schedule for this week.
Bundesliga Table
Bundesliga Results
Bundesliga Fixtures
Bundesliga Top Scorers
Soccer365's Bundesliga stats provided by Fox Soccer. Check out the Fox Soccer TV Schedule for this week.
Champions League Table
Champions League Results
Champions League Fixtures
MLS Table
MLS Results
MLS Fixtures
Soccer365's stats provided by Fox Soccer. Check out the Fox Soccer TV Schedule for this week.