The Court of Arbitration for Sport on Friday upheld FIFA's decision to allow foreign footballers and coaches to leave Russian and Ukrainian clubs due to the war.
Eight Russian clubs and top Ukrainian side Shakhtar Donetsk appealed to CAS to challenge rules introduced by world football's governing body following Russia's invasion of Ukraine in February 2022.
The court in the Swiss city of Lausanne "dismissed the appeals and confirmed the challenged decision", it said in a statement.
Shakhtar, who played in the Champions League this season, wanted compensation of up to 40 million euros from FIFA for a loss in player transfer sales.
The likes of Brazilian winger Tete and compatriot Dentinho have departed the 13-time Ukrainian champions since the Russian invasion.
In March 2022, FIFA brought in rules which automatically suspended the contracts of foreign players or coaches with Ukrainian clubs until June 30 last year.
It then replaced the suspension with an option for foreigners to suspend their contracts unilaterally until June 30 this year, provided that no mutual agreement with the club could be reached by the end of June 2022.
As for Russian clubs, foreigners could unilaterally suspend their contracts until June 30 last year.
This was extended by FIFA until June 30 this year, again if no agreement with the club was reached by the end of June 2022.
Shakhtar and eight Russian clubs challenged the extension.
The Russian sides were Zenit Saint Petersburg, Dynamo Moscow, Sochi, CSKA Moscow, Krasnodar, Lokomotiv Moscow, Rostov and Rubin Kazan.
"The CAS arbitrations were handled by two different CAS panels," the court said, one for each country.
"Both panels dismissed the appeals and confirmed the challenged decision.
"Both panels emphasised that the challenged decision was the consequence of a legitimate objective, in the light of the FIFA statutes, and that the measures adopted were not grossly disproportionate and remained within the sphere of discretion granted to FIFA by Swiss law."
FIFA is headquartered in Zurich in northern Switzerland.
At the time of FIFA's original decision in March 2022, the governing body said the move was chiefly to provide players and coaches with the opportunity to work and receive a salary, and to protect Ukrainian clubs brought to a halt by invasion.
In a July 2022 letter, seen by AFP, FIFA recognised Ukrainian sides would have to deal with numerous departures and promised that their interests would be protected.