Arab Cup's Group C, along with Jordan, Palestine and Saudi Arabia. Morocco opened the tournament with a 4–0 win against Palestine, Morocco then managed to overcome a highly defensive Jordan with another 4–0 triumph, They won their final match in a 1–0 victory against Saudi Arabia. they were eliminated in the quarter-final after penalty-shootout against Algeria. After easily topping their 2021 Africa Cup of Nations qualification group which consisted of Mauritania, Burundi, and Central African Republic, Morocco were one of the favorites to win the 2021 edition of the tournament hosted in Cameroon. Morocco were drawn into group E that included Gabon, Ghana and Comoros. Morocco won its first game against Ghana scored by Sofiane Boufal in the final minutes of the game. In their second game against Comoros, they claimed a 2–0 victory. Their final match against Gabon ended in a draw, making Morocco reach the round of 16 after ending up first in the group. They defeated Malawi 2–1 in the round of 16. They were eliminated in the quarter-final after a 2–1 loss against Egypt. After qualifying for the 2022 FIFA World Cup by winning the CAF Third Round African Qualifiers, the team was drawn in Group F along with Croatia, Belgium, and Canada. Morocco were not expected to qualify, but after holding previous runners-up Croatia to a 0–0 draw and shocking previous third place Belgium 2–0, a 2–1 win over Canada meant they finished top of the group and advanced to the round of 16 for the first time since 1986. There, they met Spain, drawing 0–0 to force a penalty shoot-out. Goalkeeper Yassine Bounou saved two penalties, and Achraf Hakimi scored the decisive penalty with a panenka for Morocco to advance to the quarter-finals for the first time. They advanced further to the semi-finals winning against favourite Portugal, 1–0 . The Moroccan forward Youssef En-Nesyri leapt to 2.78m (9ft1) to score a header that was the match-winning goal. That made Morocco the first African and Arab team to qualify for the semi-finals. However, they lost to France in the semi-final 2–0 on 14 December at the Al Bayt Stadium in Al Khor, putting an end to Morocco's dream run. They played Croatia for third place on 17 December at the Khalifa International Stadium in Ar-Rayyan, a rematch of the earlier group stage meeting. They lost 2–1 to the latter, and ended their World Cup campaign