Senegal's players briefly abandoned the pitch in stoppage time after a disputed penalty was awarded to Morocco, following a disallowed goal for Senegal.
The team, led by coach Pape Thiaw, returned after a 14-minute delay, with goalkeeper Édouard Mendy saving the subsequent penalty.
Further unrest ensued, including Senegal fans attempting to storm the pitch and journalists clashing in the press box.
Pape Gueye scored for Senegal in the fourth minute of extra time, giving his side a 1-0 lead.