Gervinho opened the scoring for Ivory Coast from a counter-attack
Ten-man Ivory Coast became the first side to reach the last eight of the Cup of Nations after defeating Ghana 3-1.
The Elephants broke the deadlock through Gervinho on 23 minutes with a classic counter-attacking move.
The Ivorians extended their lead in the 66th minute when Siaka Tiene curled a left-foot free-kick into the top right-hand corner of the goal.
Didier Drogba headed in from a delightful cross before Asamoah Gyan converted a late penalty for Ghana.
Despite their victory, the Ivorians will be lamenting the absence of defender Emmanuel Eboue in the last eight after the Arsenal man was sent off for a crude tackle on Agyemang Opoku.
However, at least the Elephants have a quarter-final to look forward to - Ghana will only be guaranteed of further participation if they beat Burkina Faso on Tuesday to finish second in a group reduced to three teams following Togo's withdrawal.
The young Ghanaian side could, though, have taken an early lead as midfielder Emmanuel Agyemang-Badu fired a long-range effort in the fifth minute which beat goalkeeper Barry Boubacar but went inches wide.
Ivory Coast rallied and took control of the midfield with Salomon Kalou, Yaya Toure and Didier Zokora directing affairs and creating opportunities for Drogba and Gervinho.
Goalkeeper Richard Kingson palmed away a Zokoro long-range drive before imposing centre back Isaac Vorsah twice stood firm to deny Drogba.
But they were not be denied when Gervinho ran from the halfway line and played a one-two with Kalou before finishing past Kingson.
Boubacar had to be in top shape on 38 minutes to parry Kwadwo Asamoah's drive after the Udinese man dummied his marker at the edge of the box.
Ghana coach Milovan Rajevac injected more urgency into his side at the break when he brought on Michael Essien for Moussa Narry, while Asamoah Gyan replaced youngster Dede Ayew.
And the ploy worked initially as Ghana took a hold of the midfield, prompting a series of desperate tackles from the Ivorian defenders, Eboue guilty of a two-footed lunge on Opoku for which he received his marching orders.
For us now it is to be or not to be
Ghana coach Milovan Rajevac
Ghana made use of their numerical advantage to carve out chances for Asamoah - who went close with a free-kick - and Matthew Amoah, who hit the post with a low shot.
And they were made to pay for their profligacy when Tiene curled a left-foot shot into the top corner which left Kingson stranded.
The Elephants were 3-0 up in 90th minute after substitute Abdel Kader Keita left his two markers sprawling on the ground before crossing for Chelsea striker Drogba to head emphatically past the keeper.
But there was still time for Ghana to pick up the scantest of consolations, Gyan sending the Ivorian keeper the wrong way after picking himself up to convert a penalty.
However, Ivory Coast coach Vahid Halilhodzic argued the penalty decision was one of a number of errors by referee Jerome Damon.
"I'm really angry against the refereeing," Halilhodzic said.
"It's too much now. We are going to discuss the matter with the federation's officials to see what we can do about this."
With his side's quarter-final scheduled for 24 January, Halilhodzic added that he will attempt to arrange a friendly to keep players sharp.
"Ten days without playing, this is not good, we have to play a match but we haven't found an opponent yet," he said.
Ghana coach Milovan Rajevac admitted his side's lack of experience had counted against them.
"Quality and experience was the key of Ivory Coast's team," he stated.
"For us now it is to be or not to be, we must do our best to prepare for this game (against Burkina Faso) and win it."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.