Pleased with decision
"We were supportive of the clubs' claims and we are very pleased with the CAS decision," ECA chairman Karl-Heinz Rummenigge said in a statement.
The ECA, which represents 103 of Europe's best and wealthiest clubs, encouraged the three teams to
challenge FIFA because the Olympic tournament does not feature on the official international match calendar.
"ECA and the clubs have been consistent in outlining our understanding of the legal situation," Rummenigge said. "The ruling has proved that we were correct and in line with the FIFA regulations."
It is the second time that the ECA has opposed FIFA since being created in January as an officially recognised, independent forum for clubs to influence the way football is run.
At their first meeting in Switzerland last month, ECA members rejected the '6+5' rule proposed by FIFA president, Sepp Blatter, that would limit the number of foreign players that club teams could start a match with.
The ECA also stated one of its priorities is to change the international match calendar so players spend less time away from clubs - which pay their salaries - to be with a national team.
Rummenigge said the ECA should meet with FIFA and European governing body UEFA after the Olympics finish "to ensure that we can avoid such conflicts in the future".
Messi, Rafinha and Diego could still play at the Olympics.
The CAS ruling called on the clubs to show goodwill toward the players if they still wanted to represent their country in the 16-nation event.
Argentina coach Sergio Batista said Messi wants to play for his country instead of returning to Barcelona, while Schalke and Bremen later made a conditional offer to let Rafinha and Diego
stay with Brazil for the Olympic
tournament.