Comoros maintained their hopes of reaching the last-16 at the Cup of Nations after beating 10-man Ghana 3-2 in a pulsating match at the Roumdé Adija Stadium in Garoua.
Ghana required a healthy victory over the tournament debutants to have a chance of moving into the last-16 from Group C as one of the four best third-placed teams. And the four-time champions started with vigour.
Abdul Issahaku made several promising incursions down the right wing but it was Comoros who took the lead after four minutes through El Fardou Ben Mohamed.
And Ghana's task was made even more onerous when skipper André Ayew was given a red card in the 25th minute for colliding with the Comoros goalkeeper Salime Boina after he let the ball slip from his grasp.
When Ahmed Mogni swept home the second in the 62nd minute, it appeared to be all over for the four-time champions.
But two minutes later Richmond Boakye stabbed in from close range and after Alexander Djiku levelled in the 77th minute, an unlikely victory loomed.
But five mintues from time, Mogni struck again.
"We did not back down even after Ghana equalised," said Comoros coach Amir Abdou.
"We learnt from the mistakes we made in previous games and we are satisfied with the way we played.
"We had a plan and stuck to it. We always believed we could achieve a famous victory for our nation."
After the final whistle, Ghana's players slumped to the turf before forming a huddle near the centre circle and then trudging to applaud their fans.
Questions will be raised over the Ghana football federation's wisdom of rehiring Milovan Rajevac in September.
The 68-year-old Serb - who took the team to the 2010 Cup of Nations final and the last eight at the 2010 World Cup - has overseen the worst Ghana performance at the Cup of Nations since 2006.
"I came to Ghana to qualify the team for the World Cup," he insisted. That is my primary target," he said as furious fans headed away from the stadium.
"I will stay and lead the team in the March play-offs."
Morocco claimed Group C after a 2-2 draw with Gabon who finished second.
Vahid Halilhodzic's men will take one of the third-placed teams in Yaoundé next Tuesday while Gabon face Burkina Faso on Sunday in Limbé.