Riot police, mounted officers and dogs were deployed amid chaotic scenes outside a World Cup stadium in Qatar.
Security forces dragged away at least three people as Morocco played Spain inside the nearby Education City Stadium.
Heated discussions took place between some Morocco fans and security forces over whether they could head through the perimeter gate to the spectator entrances.
At one stage, security forces inside the stadium perimeter – but outside the spectator entrances – marched forward to move people back.
Police horses also moved forward and a PA news agency reporter saw three people bundled away by security forces.
Riot police were then asked to put on their helmets and moved to a new position while police dogs could also be seen.
One security official said of the people outside: “They are not moving away, they want to enter.”
It was unclear how many people outside the stadium had tickets.
A member of the security forces later removed someone for filming on their phone and asked a PA reporter to stop filming.
The atmosphere outside the stadium did calm down with groups of Moroccan supporters and others crowding around phones to watch the game after moving away from the perimeter gate.
Security forces handed water to some Moroccan supporters while a couple of other officers could be seen watching the game by looking over the shoulders of fans.
There were wild celebrations outside the ground when Morocco beat Spain 3-0 on penalties, after the game finished 0-0 following extra time, to secure a famous win and a place in the quarter-finals.
Moroccan fan Ayoub, 28, who lives in Doha, said he was “so happy” after the win.
Looking to the rounds ahead, he said: “Give me Portugal, no problem. Give me Brazil, no problem. Morocco are strong.”