Hosts Morocco are through to the final of the African Nations Championship having beaten Libya 3-1 after extra-time at the Stade Mohammed V in Casablanca ©CAF/Twitter

Hosts Morocco are through to the final of the African Nations Championship following their 3-1 victory over Libya after extra-time at the Stade Mohammed V in Casablanca.

Following a 1-1 draw inside 90 minutes, goals from Ayoub El Kaabi and Walid El Karti ensured victory for the Moroccans.

It sets up a final against Nigeria, who defeated Sudan at the Stade de Marrakech later in the day.

Morocco broke the deadlock in the 73rd minute when substitute Zakaria Hadraf's cross was met by El Kaabi to guide his header home and register his seventh goal of the tournament.

It did not prove to be enough as goalkeeper Anas Zniti was caught in possession by Saleh Al Taher in the 86th minute, allowing Abdoulraham Khalifa to score the equaliser into an open goal.

Morocco struck again seven minutes into extra-time with El Kaabi tapping in at the far post from a Hadraf corner that Jawad El Yamiq helped on with his head.

The result was put beyond doubt with two minutes left on the clock as El Karti won a penalty from Ahmed El Trbi's foul and stepped up to convert it himself.

The Libyans argued that El Trbi had won the ball but the referee felt he had used two feet in making the challenge.

Today’s second semi-final saw Nigeria edge Sudan 1-0 to book their place in the final.

Gabriel Okechukwu was the match winner with his first-half goal enough to seal victory.

It came in the 16th minute after he latched onto Anthony Okpotu’s knock down, ran towards goal and slipped the ball under the onrushing Sudan keeper Akram El Hadi Salim.

Both teams were reduced to 10 men with Ifeanyi Ifeanyi sent off for Nigeria and Sudan’s Bakri Bachir also dismissed.

Ifeanyi was dismissed in the 58th minute after being shown a second yellow card, while Bachir was shown a straight red card in the closing stages for tripping the goal-bound Dayo Ojo.

The final is due to take place on Sunday (February 4) at the Stade Mohamed V.

Both Morocco and Nigeria will be contesting the final for the first time.

The third-place play-off, between Libya and Sudan, is scheduled to be held at the Stade de Marrakech on Saturday (February 3).