Morocco head coach Walid Regragui promised more is to come from his side, who advanced to the round of 16 at the World Cup for the first time in 36 years with a 2-1 win over Canada.
The Atlas Lions took the lead on four minutes when a major error by goalkeeper Milan Borjan gifted Hakim Ziyech the opener and Youssef En-Nesyri made it two before the break.
Nayef Aguerd snapped a six-game clean sheet streak with an own goal but the Moroccans breathed a sigh of relief when Canadian skipper Atiba Hutchinson's second-half header off the crossbar missed by mere inches, landing on but not crossing the goal-line, ensuring they finished top of Group F.
"It was not easy," said Regragui.
"When you do have this opportunity to get into history, to make history, you remember it. And, honestly, today, first half, I think it was one of the best performances that we have had in a long time."
Morocco World Cup squad 2022
Goalkeepers: Yassine Bono, Munir, Ahmed Reda Tagnaouti
Defenders: Achraf Hakimi, Noussair Mazraoui, Romain Saiss, Nayef Aguerd, Achraf Dari, Jawad El-Yamiq, Yahia Attiat-Allal, Badr Benoun
Midfielders: Sofyan Amrabat, Selim Amallah, Abdelhamid Sabiri, Azzedine Ounahi, Bilel El Khanouss, Yahya Jabrane
Forwards: Hakim Ziyech, Youssef En-Nesyri, Sofiane Boufal, Zakaria Aboukhlal, Ez Abde, Amine Harit, Ilias Chair, Abderrazak Hamdallah, Walid Cheddira
Who is their best player?
Other than Hakim Ziyech, the team's standout player is undoubtedly Achraf Hakimi, who plays at right back for Paris Saint-Germain. Despite being born in Spain, Hakimi has represented Morocco since under-17 level, before making his full debut in 2016.
Telegraph readers rated Ziyech the best Morocco player in their opening match against Croatia with a rating of 7.5, level with midfielder Sofyan Amrabat.
What are Morocco's results and fixtures?
Morocco face Spain in the last 16 of the World Cup in Qatar. The match will be played at Education City Stadium on Tuesday, December 6 and will kick off at 3pm.
November 23: Morocco 0 Croatia 0
November 27: Belgium 0 Morocco 2
December 1: Canada 1 Morocco 2
What is Morocco's World Cup record?
As an independent nation, Morocco has taken part in five World Cup finals, competing before 1958 as part of France. Their highest finish came in 1986, when they progressed from the group stage to play West Germany in Mexico. They were knocked-out by the eventual finalists 1-0.
Argentina | Australia | Belgium | Brazil | Cameroon | Canada | Costa Rica | Croatia | Denmark | Ecuador | England | France | Germany | Ghana | Iran | Japan | Mexico | Morocco | Netherlands | Poland | Portugal | Qatar | Saudi Arabia | Senegal | Serbia | South Korea | Spain | Switzerland | Tunisia | Uruguay | USA | Wales
Morocco are currently a best price of 125/1 to win the World Cup.