The Court of Arbitration for Sport today ruled in favour of European clubs in their battle against Fifa, allowing them to pull players out of the Olympics.
Barcelona, Werder Bremen and Schalke had taken their case to CAS after arguing that Fifa's position that it was "mandatory" for all players aged 23 and under to be released was not enforceable as the Olympics do not appear on Fifa's official calendar.
The decision means that Barcelona will pull Lionel Messi out of the Argentina squad, while Rafinha and Diego will be recalled from Brazil by Schalke and Werder Bremen respectively.
It is not expected that any other players will be withdrawn as they have travelled with the permission of their clubs.
"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."
The three clubs made the appeal as they do not want the players to miss the start of the season. The Bundesliga season in Germany begins before the conclusion of the Olympics and Schalke will also play a Champions League qualifier.
Barcelona will have also have a Champions League qualifier to play before the Olympics conclude.
The tournament in Beijing begins tomorrow, one day before the official opening ceremony of the Games.
The vast majority of players at the Olympics have travelled with their club's permission, with some of them such as Belgium's Vincent Kompany cutting deals to allow them to play.
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 good will 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," the statement said.
Fifa is yet to respond to the CAS ruling, but president Sepp Blatter had said the governing body would accept the court's decision.
The format of the Olympic tournament is now expected to be reviewed before the 2012 Olympics in London.