Three European clubs have won their appeal to the Court of Arbitration for Sport to keep their players out of the Olympic football tournament.
Barcelona, Werder Bremen and Schalke all appealed to the CAS to prevent Lionel Messi, Diego and Rafinha from going to the Games in Beijing.
Messi had been called up to the Argentina squad, while Diego and Rafinha had both been named in the Brazil squad for this month's tournament.
Barcelona were keen for Messi to stay with them as they wanted the skilful forward available for their UEFA Champions League qualifier against either Beitar Jerusalem or Wisla Krakow.
Fifa had ordered that all players under the age of 23 must be released by their clubs for the tournament, but the CAS have ruled Barcelona, Werder Bremen and Schalke do not need to release their players.
"The Court of Arbitration for Sport (CAS) has upheld the appeals filed by FC Schalke 04, SV Werder Bremen and FC Barcelona against the decision issued on 30 July 2008 by the Single Judge of the Fifa's Players' Status Committee that consequently has been set aside in its entirety," said a CAS statement.
CAS found that Fifa's position was based on custom rather than law, meaning clubs could not be forced to release their players.
"The Olympic Football Tournament Beijing 2008 is not included in the Co-ordinated Match Calendar and there is no specific decision of the Fifa
Executive Committee establishing the obligation for the clubs to release players under 23 for this tournament.
"The requirements to justify a legal obligation of clubs to release their players for the Football Tournament Beijing 2008 on the basis of customary law are not met."
In its statement, CAS stated that it hoped the decision would not cause major disruption to the tournament.
"In view of Fifa's recommendation made to the clubs to release their players as well as of the Olympic spirit, the CAS call upon the goodwill and good sense of Fifa and the clubs to find a reasonable solution with regard to players who wish to represent their country in the Olympic Games," concluded the statement.
Fifa is yet to respond to the CAS ruling, but president Sepp Blatter had said the governing body would accept the court's decision.