LAUSANNE, Switzerland (AP) — The Moroccan soccer federation is taking FIFA to court in the hopes of recruiting Spain forward Munir El Haddadi before the World Cup.

The Court of Arbitration for Sport says it has registered an appeal by El Haddadi and the Moroccan federation against last month's FIFA ruling that blocked the 22-year-old Barcelona player from transferring allegiance.

FIFA rules prohibit switching nationality after playing in a competitive match.

El Haddadi, who has family ties to Morocco, played for Spain in a 2016 European Championship qualifying game, coming on as a 77th-minute substitute in a 5-1 win over Macedonia.

CAS says El Haddadi and Morocco want a ruling by mid-May, before World Cup squads are selected. No hearing date has been set.

Morocco and Spain will face each other at the World Cup on June 25 in Kaliningrad. Portugal and Iran are also in Group B.