The Court of Arbitration for Sport (CAS) has rejected an appeal by Munir El Haddadi to represent Morocco at the World Cup in Russia.
The 22-year-old striker, who was born in Spain to a Moroccan father and Spanish mother, was hoping to switch allegiance from the country of his birth to Morocco.
However, the petition presented by the Moroccan Football Federation has been turned down at a hearing in Lausanne.
Munir represented Spain once at full international level against Macedonia in a Euro 2016 qualifier at the Ciutat de Valencia. and has also accumulated 16 Under-21 caps, while this season he has been loaned out by Barcelona to Alavés.