Ghana, the four-time African champion, was knocked out of the Africa Cup of Nations after losing 3-2 to Comoros in Group C on Tuesday in Garoua.
After captain Andre Ayew was sent off after 25 minutes, the Black Stars lost after overcoming a two-goal deficit after Comoros’ Ahmed Mogni scored his second goal five minutes from time.
Morocco and Gabon drew 2-2 in the same group in Yaounde to keep their top and second spots and qualify for the round of 16, which begins on Sunday.
Comoros, a small island nation off Africa’s south coast, finished third and now wait until Thursday to find out if they are among the best four third-placed teams, who will compete for the last 16 berths.
Ghana’s night started badly after just four minutes, when El Fardou Ben Mohamed, a Serbian, put the first-time qualifiers ahead.
Mogni, who plays for Annecy in the French third tier, got a second soon after the hour mark, but Ghana rallied with goals from Richmond Boakye and Alexander Djiku.
Mogni scored his second goal of the game, pushing a low cross from Ben Djaloud past goalkeeper Joseph Wollacott to give the islanders a shock victory.