Comoros beat Ghana 3-2 for their first-ever win at the Africa Cup of Nations ©Getty Images

Ghana were dumped out of the Africa Cup of Nations after falling to a 3-2 defeat at the hands of tournament debutants Comoros.

El Fardou Ben Nabouhane put the islanders into an early lead after four minutes at the Roumdé Adjia Stadium in Garoua.

It went from bad to worse for four-time champions Ghana when André Ayew was shown a controversial straight red card for a challenge on goalkeeper Salim Ben Boina after the 25-minute mark.

Ahmed Mogni made it 2-0 in the second half as the game looked to be slipping away from the Black Stars.

However, substitute Richmond Boakye found the top corner with a glancing header to give Ghana a glimmer of hope and Alexander Djiku then drew them.

Mogni added his double with five minutes of normal time remaining to condemn the Ghanaians to their first group-stage exit at the tournament since 2006.

It is Comoros' first-ever win at the Africa Cup of Nations.

Comoros could advance as one of the best third-place teams, but with only three points are in a precarious position.

Elsewhere in Group C, the Stade Ahmadou Ahidjo in Yaoundé saw Morocco and Gabon draw 2-2.

Both team advance to the last 16.

Jim Allevinah drew first blood for Gabon with a composed finish past the onrushing Munir Mohamedi.

Morocco found an equaliser after 74 minutes via a Sofiane Boufal penalty.

A difficult cross from Gabon forced Nayef Aguerd into scoring an own goal before Achraf Hakimi scored a stunning free kick three minutes later.

Zimbabwe picked up their first win of the tournament with a 2-1 win over Guinea in Group B, but are still out and the losers through.

Knowledge Musona and Kudakwashe Mahachi fired the Warriors into the lead before Guinea captain Naby Keïta pull one back.

The match was refereed by Rwandan Salima Mukansanga who made history as the first woman to officiate a match at the competition.

Senegal also secured progression from Group B following a 0-0 draw with Malawi, who in turn finish the group with four points and a good chance of being one of the best third-placed teams.

Pape Gueye came on as a substitute for Senegal, following a Court of Arbitration for Sport decision to overrule FIFA's suspension of the player at the centre of a transfer row.