Morocco also reached the 2025 Africa Cup of Nations final on home soil, but lost 1-0 to Senegal after extra time in a dramatic match in which their opponents temporarily refused to play after the hosts were awarded a stoppage-time penalty that was subsequently missed by Brahim Diaz.
"The team needs a fresh face, a different energy, and a new perspective with a new coach," added Regragui.
"I think the team needs a new lease of life before the World Cup, a new vision to continue progressing. My decision to leave is part of this team's evolution."
He had been under intense pressure to deliver a first continental title since 1976, and speculation had been gathering in recent weeks that the Royal Moroccan Football Federation (FRMF) were set to make a change.
Morocco captain Achraf Hakimi said on social media how Regragui "left an unforgettable mark on the history of Moroccan football".
Morocco open their World Cup campaign against five-time champions Brazil on 13 June.
The North Africans will also face Scotland and Haiti in Group C of the tournament, which will be held in the United States, Mexico and Canada.
The Atlas Lions meet Ecuador and Paraguay in friendly matches during next month's international window.

2 hours ago
19








English (US) ·