Sports' highest court rejected appeals by all 45 Russian athletes plus two coaches who were banned from the Pyeongchang Olympics over doping concerns in a decision announced Friday less than nine hours before the opening ceremony.
The International Olympic Committee had refused to invite the group of Russians, saying it had evidence of alleged doping in Russian sports.
The Court of Arbitration for Sport ruled that the IOC has the right to set its own standards for who is eligible.
CAS Secretary General Matthieu Reeb, reading from a statement and declining to take questions, said the IOC process "could not be described as a sanction but rather as an eligibility decision."
"No finding that this was carried out in a discriminatory, arbitrary or unfair manner," he said.
The IOC issued a statement welcoming the decision. "We welcome this decision which supports the fight against doping and brings clarity for all athletes," the statement said.
A vetting process was designed to exclude Russian athletes from the games if IOC officials weren't sure they were clean, even if they hadn't been banned for doping.
The IOC has invited 168 Russians to participate as "Olympic Athletes from Russia," competing in neutral uniforms under the Olympic flag.
The ruling comes a day after the first Olympic competitions began and ends more than a week of uncertainty for two groups of athletes who lodged last-ditch cases to the CAS.
As well as the 45 athletes, the ruling covers a luge coach and a skeleton coach.
Russian athletes scattered around various training camps in Russia and Asia had been ready to fly to South Korea to compete.
On Thursday, CAS rejected more appeals by six Russian athletes and seven support staff on procedural grounds, saying it lacked the jurisdiction to hear those cases.
The IOC has refused to comment on individual Russian athletes but says it decided who to exclude using a newly obtained Moscow laboratory database with evidence of past doping offenses.
It refused to invite some Russians even after their disqualifications from the 2014 Olympics were lifted by CAS last week.
The IOC pointed to a CAS statement that declared the Russians were not necessarily innocent of doping, just that the evidence was insufficient to ban them. Also, the IOC said, "there were additional elements and/or evidence, which could not be considered" in last week's CAS case "that raised suspicion about the integrity of these athletes."
Thirteen of those athletes, and two coaches, were among the 45 whose verdicts were announced Friday.
More AP Olympic coverage: https://wintergames.ap.org