Spain steeplechaser Angel Mullera will compete in the Olympics after winning an appeal against his exclusion following a doping investigation.
The Court of Arbitration for Sport (CAS) said the decision by the Spanish athletics federation and Olympic committee "should be set aside".
Mullera, 28, was dropped in July while the Spain team considered disciplinary proceedings for alleged doping.
The CAS said Mullera's Olympic registration had never been withdrawn.
Mullera was dropped after a newspaper published an email exchange between an address in his name and an unidentified doctor in which a possible doping plan was discussed.
The ad hoc division of the CAS said in a statement: "[It has] partially upheld an application of the Spanish athlete Angel Mullera challenging his exclusion from the Spanish Olympic team.
"The decision to exclude the athlete from the 2012 Olympic Games shall be set aside and the Spanish athletics federation and the Spanish Olympic Committee shall confirm his selection in the Spanish Olympic team."