Barcelona forward Munir El Haddadi is challenging Fifa rules which stop players switching national allegiances.
The 22-year-old was a substitute for Spain in a European Championship qualifier in September 2014 but now wants to play for Morocco, where his parents are from.
Fifa rejected an application to change nationalities in March.
El Haddadi and the Morocco Football Federation (FRMF) have appealed to the Court of Arbitration for Sport (Cas).
El Haddadi, who is on loan at Spanish club Alaves from Barcelona, was born in Spain.
The international governing body’s rules state that players cannot represent a nation if they have already played for another country in a competitive fixture.
Cas said it has been asked to make a decision by mid-May “in order for the player’s sporting nationality to be decided prior to the commencement of the 2018 World Cup”.
It will now select a panel of three arbitrators to hear the case.
“Following the hearing, the panel will deliberate and issue a decision in the form of an arbitral award,” the body added.