The Morocco national football team has represented Morocco in men's international football since their first international match in 1957. It is controlled by the Royal Moroccan Football Federation (FRMF), the governing body for football in Morocco. It has been affiliated with FIFA since 1960, with the Confederation of African Football since 1959, and with the Union of North African Football since 2005. The team, which is known as the Atlas Lions, plays home matches at the Prince Moulay Abdellah Stadium in Rabat, and trains at the Mohammed VI Football Complex in Salé.

Widely regarded as Africa's most successful national football team and one of the best teams in the world, Morocco has won five continental titles, including the 1976 and 2025 editions of the African Cup of Nations. They won the African Nations Championship in 2018, 2020 and 2024. Morocco has qualified for the FIFA World Cup on seven occasions. In 1986, they made history as the first African team to win a World Cup group and advance to the knockout stage. At the 2022 World Cup, Morocco became the first African and first Arab team to reach a World Cup semi-final. They were also the third World Cup semi-finalist from outside Europe or South America. Over 2023–2026, Morocco broke an international football world record, achieving the longest winning streak at 19 matches. During this run they also achieved a 33 undefeated match record.

History Formation and early years The Moroccan national team was founded in 1928 and played its first game on 22 December of that year against France's B team, losing 2–1. The team, formed of the best footballers of the Moroccan Football League (LMFA), was active in friendly matches against other North African teams such as Algeria and Tunisia.

On 9 September 1954, an earthquake struck the Algerian region of Orléansville (now Chlef), destroying the city and killing 1,400 people. On 7 October 1954, the French Football Association and the Maghreb inhabitants organized a charity match to raise funds for the families of the victims of the earthquake. In the match, held at the Parc de Princes in Paris, a team made up of Moroccans, Algerians and Tunisians played against France. Led by star Larbi Benbarek, the Maghreb selection managed to win 3–2, a month before the Toussaint Rouge attacks by the Algerian National Liberation Front which marked the beginning of the Algerian War.

In 1955, the Royal Moroccan Football Federation was established, at the end of the French protectorate of Morocco, which had lasted since 1912.

On 19 October 1957, at the second edition of the Arab Games in Lebanon, Morocco made its debut as an independent country against Iraq, at the Camille Chamoun Sports City Stadium, and drew 3–3. At the tournament, Morocco recorded their first-ever win, defeating Libya 5–1, then beat Tunisia 3–1 to reach the semi-finals. After a 1–1 draw with Syria, lots were drawn to decide who would progress to the final, and Syria were selected at Morocco's expense. Morocco withdrew from the third-place play-off against Lebanon and finished fourth overall.

Between 1957 and 1958, Morocco held numerous friendly matches against the National Liberation Front team, the representative of Algeria before its independence in 1958. In 1959, the team took part for the first time in an international competition, the qualifying rounds of the 1960 Rome Olympics. Drawn into a group with Tunisia and Malta, Morocco finished second on goal difference and failed to progress. That same year, the Royal Moroccan Football Federation joined FIFA.In 1960, Morocco competed in World Cup qualification for the first time. Drawn against Tunisia in the first round, Morocco won the first leg 2–1, while Tunisia won the second leg by the same score. A play-off held in Palermo, Italy finished in a draw, so a coin toss was used to determine who progressed. Morocco won the toss, and beat Ghana 1–0 on aggregate to reach the inter-continental play-offs. Drawn against Spain, Morocco lost 4–2 on aggregate and thus failed to qualify.

The following year, Morocco held the Pan-Arab Games and won the football tournament, winning all five of their matches. Their third match, against Saudi Arabia, resulted in Morocco's biggest-ever victory, winning 13–1. They also claimed their first two wins against a European team, beating East Germany 2–1 and 2–0.

In 1963, the Moroccan team came close to qualifying for the African Cup of Nations; in the decisive play-off against Tunisia, they were defeated 4–1 in Tunis and won 4–2 at home, therefore being eliminated. At the 1963 Mediterranean Games in Naples, they finished fourth after a 2–1 defeat in the final for third place against Spain's reserve team.

1963–1976: First international competitions Morocco participated in the final phase of an international competition for the first time at the 1964 Tokyo Olympics. Having qualified under the leadership of manager Mohamed Massoun, the Moroccans were included in a group of three teams due to the withdrawal of North Korea. Morocco lost both their matches, against Hungary (6–0, the team's worst-ever defeat) and Yugoslavia (3–1, despite taking the lead in the second minute via Ali Bouachra).

In 1966, the Moroccan Football Association joined the Confederation of African Football, and the team participated in qualifying for the 1970 World Cup in Mexico. Their debut eliminated Senegal (1–0) and Tunisia after a draw. In the final round of the preliminaries, against Sudan and Nigeria, Morocco obtained five points, finishing ahead of Nigeria. Shortly after, Morocco lost the decisive play-off against Algeria to enter the final stage of the 1970 Africa Cup of Nations.

Morocco thus became the first African national team to qualify for the World Cup after having played in an elimination tournament. The Moroccan team, coached by the Yugoslav Blagoje Vidinić, consisted entirely of players in the Moroccan league, including Driss Bamous and Ahmed Faras.

On 3 June 1970, against West Germany, Morocco opened the scoring with a goal in the 21st minute of the game scored by Houmane Jarir. In the second half, however, the Germans scored twice and won 2–1. The Atlas Lions then played against Peru, conceding three goals in ten minutes to lose 3–0. On 11 June 1970, the eliminated Moroccans drew with Bulgaria 1–1. It was the first point obtained by an African national team at the World Cup.

In 1972 Africa Cup of Nations qualification, the Atlas Lions ousted Algeria, then faced Egypt, defeating them 3–0 in the first leg and suffering a 3–2 defeat on the way back. However, the aggregate win meant they qualified for the final phase of the continental tournament for the first time. In the group stage, they accumulated three 1–1 draws against Congo, Sudan and Zaire and were eliminated in the first round. All three Moroccan goals were scored by Ahmed Faras.

Qualifying for the 1972 Olympics in Munich with two wins and two draws, Morocco debuted in Group A with a goalless draw against the United States, then lost 3–0 against hosts West Germany and defeated Malaysia 6–0 with a Faras hat-trick, thereby advancing to the second round. Due to defeats against USSR (3–0), Denmark (3–1) and Poland (5–0), they were eliminated from the tournament; finishing bottom of their group.

In the 1974 World Cup qualifiers, Morocco successfully passed three qualifying rounds before entering the final stage alongside Zambia and Zaire. Losing 4–0 away against Zambia, the Moroccans bounced back in the second game, defeating the same opponent 2–0 at home. They then went to Zaire for their third game but lost 3–0, conceding all three goals in the second half, with Faras leaving the field due to injury. Morocco filed an appeal, trying to get the match to be replayed; it was dismissed by FIFA. In protest, Morocco withdrew from the qualifiers causing the Atlas Lions to miss their final game at home against Zaire which had already qualified for the finals, with FIFA awarding Zaire a 2–0 win on walkover. For the same reason, Morocco also decided not to take part in the 1974 African Cup of Nations qualification. As a result, in 1974, Morocco played only two games, both against Algeria, achieving a 2–0 win and a 0–0 draw. Morocco then resumed playing in FIFA and CAF competitions, qualifying for the 1976 Africa Cup of Nations by eliminating Ghana in the last round, but failed to qualify for the 1976 Olympics, being eliminated by Nigeria.

1976–1986: Victories and defeats Morocco, coached by the Romanian Virgil Mărdărescu and captained by Faras, took the continental throne at 1976 African Cup of Nations, in only the country's second participation in the competition. Ahmed Makrouh scored in the final to equalize at 1–1, which gave Morocco the first, and to date, only cup in its history.

After failing to qualify for the 1974 FIFA World Cup, they also missed the 1978 and 1982 tournaments. At the 1978 Africa Cup of Nations, they were eliminated in the first round, while in 1980 they finished in third place, beating Egypt 2–0. They then won the 1983 Mediterranean Games, played at home, after a 3–0 win in the final against Turkey B.

Morocco did not qualify for either the 1982 or 1984 Africa Cup of Nations. Two years later, they finished fourth, losing 3–2 in the third-place play-off to Ivory Coast.

1986–2000: The golden generation

Morocco qualified for the 1986 FIFA World Cup in Mexico, and topped a group consisting Portugal, England and Poland, thanks to two draws against the English and Polish and a 3–1 win against the Portuguese. However, they were narrowly eliminated by West Germany in the first knockout round, thanks to a goal from Lothar Matthäus one minute from the end of regulation time. Morocco became the first African or Arab national team to advance from the first round of the World Cup.

Two years later, the Moroccan team presented itself at the 1988 African Cup of Nations as a host country with high expectations. After winning in the first round, they were eliminated in the semi-finals by Cameroon and finished in fourth place after losing the third-place play-off against Algeria 1–1 after extra time, 4–3 after penalties.

Morocco failed to qualify for the 1990 FIFA World Cup and was eliminated in the group stage of the 1992 African Cup of Nations. The team also did not qualify for the 1994 and 1996 African Cup of Nations tournaments. Despite these setbacks, the team qualified for the 1994 FIFA World Cup in the United States and the 1998 FIFA World Cup in France. In both tournaments, Morocco were praised for their attacking style of play, led by key players such as Mustapha Hadji, Noureddine Naybet, and Salaheddine Bassir.

At the 1998 Africa Cup of Nations, after winning their group, Morocco were defeated by South Africa 2–1.

2000–2021: Difficult years Morocco took part in the 2004 African Cup of Nations, drawn into Group D defeating Nigeria 1–0, defeating Benin 4–0 and drawing 1–1 with South Africa. Morocco qualified to the knockout stages, facing Algeria; they eventually won 3–1 in extra time, and 4–0 against Mali in the semi-final. They lost the 2004 African Cup of Nations Final against Tunisia 2–1.

In 2012, the national team won the Arab Cup, topping their group, defeating Iraq in the semi-final and Libya in the final.

In 2014, Morocco debuted in the African Nations Championship after failing to qualify in the 2009 and 2011 editions. Led by coach Hassan Benabicha, Morocco were eliminated in the second round after losing 4–3 to Nigeria in the quarter-finals. They managed to qualify for the 2016 African Nations Championship, but were eliminated in the group stages. Morocco hosted the 2018 African Nations Championship, which included a victory for the home nation, the third North African country to win the competition's title.