Fifa has cleared Munir El Haddadi to represent the Morocco national team after a previous stint with Spain.
The decision for the 25-year-old centre-forward to switch his allegiance to the Atlas Lions was confirmed on Friday.
El Haddadi was born in Spain to a Moroccan father and played for the European country’s U19 and U21 teams before he was handed a call-up to the senior side in 2014.
The forward made his debut for Spain against Macedonia in a Uefa Euro 2016 qualifier and featured for only 13 minutes in the encounter.
El Haddadi has, however, indicated his desire to change his allegiance to the Morocco national team and has made frantic efforts to ensure the success of his switch.
The forward filed an appeal at the Court of Arbitration for Sport after he was considered ineligible to feature for the North Africans by Fifa following his brief appearance for the Spain senior team.
The world football governing body recently changed its rule, permitting players under the age of 21 to switch national teams if they have made three competitive appearances or fewer.
In the case of El Haddadi, the forward played for Spain U21 side after his 21st birthday, which makes him ineligible to swap to the Atlas Lions and CAS upheld Fifa decision on the matter.
The forward has now been given the all-clear after a further amendment to the rule last week and will be available for selection in Morocco’s next outing.
"The Single Judge of the Players' Status Committee has approved the following change of association: Munir El Haddadi, (to) Morocco (from) Spain," a Fifa spokesperson told BBC Sport Africa.
The new amendment regarding the eligibility of players to switch national teams takes effect from September 2020, when the change was made, therefore clearing El Haddadi to make his switch.
"Considering the principle of legal certainty, the age requirement ("he had not turned 21 years old") shall not apply to players who played their last match in an official competition ... prior to 18 September 2020, the date the September 2020 amendments entered into force," Fifa said.
El Haddadi started his senior career at Barcelona and played a number of games for the Spanish giants before teaming up with Sevilla in 2019.
The forward has made 24 appearances for Sevilla across all competitions this season, scoring three goals, amid other dazzling displays.