Senegal beat Morocco to win the Africa Cup of Nations for a second time - but only after the final was overshadowed when they temporarily refused to play after the hosts were awarded a stoppage-time penalty with the match goalless.

Referee Jean Jacques Ndala gave the spot-kick in the 98th minute after being advised by the video assistant referee (VAR) to consult the pitchside monitor and review defender El Hadji Malick Diouf's challenge on Brahim Diaz.

Amid sensational scenes, head coach Pape Thiaw, still incensed by Ndala's decision to disallow a Senegal goal, ushered his team off the field.

Former Liverpool striker Sadio Mane stayed on the pitch and urged his teammates to finish the game.

After a delay of around 17 minutes, the players returned to the field.

Leading to the controversy, Real Madrid forward Diaz, the tournament's top scorer, was tasked with taking the penalty but his weak 'Panenka' effort was caught by Senegal keeper Edouard Mendy.

Following a thrilling end, Villarreal midfielder Pape Gueye scored the winning goal in extra time, securing Senegal's second title in five years.

Morocco's coach Walid Regragui called Senegal's actions shameful, while FIFA president Gianni Infantino condemned the ugly scenes witnessed during the final.

Thiaw later reflected on the chaotic moments and apologized for the team's initial refusal to play, stating, I accept the errors of the referee, we shouldn't have done it, but it's done and now we present our apologies to football.

Both teams and fans are now left grappling with the implications of the final, as diplomatic tensions permeated the lead-up to the match.