Morocco have beaten Spain on penalty kicks and will play either Portugal or Switzerland for a place in the semi-finals of the 2022 World Cup in Qatar.
Achraf Hakimi scored the decisive penalty to send Morocco into the last eight of a World Cup for the first time.
The game had ended goalless after 120 minutes of football.