The top court in international sports ordered South Africa to select Britain-based rider Alexander Peternell in equestrian eventing in the first case dealt with by the court's special London Games division.
Peternell won his second appeal at Court of Arbitration for Sport after a previous ruling decided that South Africa should not have selected the lower-ranked Paul Hart.
Despite the first verdict, the South African Sports Confederation and Olympic Committee simply withdrew Hart but did not enter Peternell for the games.
"It is with regret that one of our loyal countrymen, Paul Hart, has to bear the brunt of this sad situation," SASCOC chief executive Tubby Reddy said in a statement. "It forces upon the South African public an athlete that they do not necessarily recognize and one that they do not necessarily support."
CAS said its three-lawyer panel "upheld the request of Peternell and has ordered SASCOC to include him in the team of South Africa." Reasons for the decision will be published later.
"As we all know, this athlete (Peternell) has been based in the United Kingdom for the last 11 years consecutively," Reddy said, adding a direct apology to Hart.
"It is our belief that your selection was in fact a fair process. Unfortunately with this ruling of CAS we cannot deviate in any way whatsoever."
Eventing consists of dressage, cross-country and jumping. Competition begins Saturday and ends Tuesday.