Youth Ounahi was called up for
Morocco U20 to participate in the
2018 Mediterranean Games. On 22 June 2018, he scored a goal at the 68th minute in a tie against
Italy. He later went on to win the bronze medal with the team after a victory in the
penalty shoot-out against
Greece.
Senior On 23 December 2021,
Vahid Halilhodžić gave Ounahi his first call-up to the
Moroccan senior national team for the
2021 Africa Cup of Nations. Ounahi made his professional debut for Morocco in the
2021 African Cup of Nations in a 1–0 victory against
Ghana on 10 January 2022. In his fourth match with
Morocco, he managed to score a double in a 4–1 victory against
DR Congo in the
2022 FIFA World Cup qualification – CAF third round, which marked his first goal with the national team. On 10 November 2022, he was named in Morocco's 26-man
squad for the
2022 FIFA World Cup in
Qatar. After an impressive performance in the
round of 16 game against
Spain, which Morocco won on penalties, Spanish manager
Luis Enrique commented on Ounahi's performance: "My God, where does this guy come from? I was pleasantly surprised by their number eight. I don't remember his name, I'm sorry…". In the quarter-final match against
Portugal, which Morocco won 1–0, no Moroccan player had more
dribbles (three) or won more duels (seven) than Ounahi. Morocco went on to finish fourth in the tournament. During a friendly match against
Brazil, which resulted in a 2–1 victory, Ounahi picked up an injury after suffering a fracture in his right toe, that required to undergo surgery, which resulted in an end of his football season. On 17 January 2024, Ounahi scored a goal in a 3–0 victory against
Tanzania, marking his first ever goal in the
Africa Cup of Nations. On 11 December 2025, Ounahi was called up to the Morocco squad for the
2025 Africa Cup of Nations. ==Personal life==