It’s Morocco’s second straight appearance in the quarterfinals after becoming the first African team to reach the semifinals in 2022.
Morocco is advancing to the World Cup quarterfinals after beating Canada 3-0 in Saturday's first round of 16 match.
While neither team was able to break through in the first half, Azzedine Ounahi eventually slotted home a well-worked Achraf Hakimi free kick to put Morocco up 1-0 in the 50th minute.
Ounahi then made it 2-0 in the 82nd minute, rounding off a sharp Moroccan counterattack. Soufiane Rahimi added a third goal in the final minute of stoppage time.
It’s Morocco’s second straight appearance in the quarterfinals after becoming the first African team to reach the semifinals in 2022.
Ranked sixth in the FIFA rankings, Morocco dispatched the Netherlands in a penalty shootout to reach the round of 16 and send the country to its earliest World Cup exit.
Canada had a couple of chances to score late. Jonathan David had a free kick from outside the box in the 78th minute, but his shot sailed over the crossbar.
The loss ends a historic run for World Cup co-host Canada, which won its first-ever knockout round match with a 1-0 victory over South Africa to reach the round of 16.
Morocco will face Didier Deschamps' France side in Boston in the quarterfinals after Les Bleus squeezed past a stubborn Paraguay team on Saturday.
Paraguay limited France's star-studded attack to few chances early on, only conceding after Désiré Doué was brought down in the box in the second half.
Real Madrid's Kylian Mbappé stepped up and converted the penalty, sending the goalkeeper the wrong way.
The goal put Mbappé joint top in the race for the tournament's golden boot. Mbappé and Argentina's Lionel Messi are on seven goals each.
On Sunday, Brazil face Erling Haaland's Norway for a spot in the quarterfinals before England play Mexico at the Estadio Azteca.
Portugal and Spain then face off in a tantalising round of 16 clash on Monday.