A vastly improved Ivory Coast team qualified for the Africa Cup of Nations quarter-finals following a silky 3-0 win over Tunisia.
But the Elephants had to wait for the final match on Saturday in Group D to see if they would qualify. A 2-0 Togo victory sent the Ivory Coast through and Algeria packing.
Under fire for an error-strewn opening win over Togo, the Ivory Coast oozed class for much of this encounter with Premier League duo Gervinho and Yaya Toure and late substitute Didier Ya Konan getting the goals.
The result lifted the Ivorians to six points, which is sufficient to earn them an early last-eight ticket.
In a surprise, Ivory Coast's talismanic captain Didier Drogba was dropped to the bench.
The 34-year-old veteran, figuring at his last Nations Cup, proved a largely ineffectual presence against Togo, with coach Sabri Lamouchi taking him off with quarter of an hour to go.
Also out were Manchester City defender Kolo Toure and midfield duo Max Gradel and Ya Konan.
Lamouchi called up Lille striker Salomon Kalou and Anzhi Makhachkala's young forward Lacina Traore, this pair joining Arsenal's Gervinho in attack, and Newcastle midfielder Cheik Tiote.
Centre-back and former Spurs player Didier Zokora (modestly using the nickname Maestro on his shirt) was handed the skipper's armband.
Neater and crisper
Tunisia's cause was severely hampered by the absence of key striker Issam Jemaa, who misses the rest of the competition with a knee injury sustained against Algeria.
"Why didn't I play Didier Drogba? Because it seemed to me that the 11 players I picked were the best to overcome this good Tunisian side," explained Lamouchi.
"My first satisfaction comes from the victory and the second from the content. We really entered this competition today.
"We caused a lot of problems for this very good Tunisian team and were never really threatened at any point."
"Why didn't I play Didier Drogba? Because it seemed to me that the 11 players I picked were the best to overcome this good Tunisian side"
Ivory Coast coach Sabri Lamouchi
Tunisia coach Sami Trabelsi said: "Until the 25th minute (and Gervinho's opener) we hadn't entered into the game. The goal that we conceded was due to a lack of focus. Up to the 85th minute we tried our best and were quite threatening at that stage"
In contrast to the match against Togo, the Elephants were playing neater, crisper football here, with Gervinho, Traore and Yaya Toure troubling Tunisia's backline.
Kalou blasted over on 18 minutes, then three minutes later Gervinho combined neatly with the influential Traore to slot a rising right-footed shot into the far corner of Moez Ben Cherifia's net.
Poor old Tunisia weren't getting much of a look-in as Ivory Coast unveiled the face of champions-in-waiting for the first time at 2013.
The frenetic early pace ebbed away as the interval loomed, with Ivory Coast having legitimate claims for a penalty for Khalil Chammam's hand-ball turned down by the Mauritian referee.
On 56 minutes a deft movement involving Traore, Gervinho and Kalou saw the ball in the back of the net, only for Gervinho to be harshly ruled offside.
A big cheer went up when Drogba began to warm up on the touchline, and an even bigger one when he made his stately entrance for the final quarter with Traore making way.
Tunisia, who grabbed a last-minute winner against Algeria, finished strongly again with Saber Khalifa squandering a chance to level before goals from Yaya Toure and Ya Konan, seconds after entering the fray in the closing two minutes, rounded off a perfect night for the top-ranked team on the continent.