PYEONGCHANG, South Korea — Russia failed in an 11th hour attempt to overturn a ban against 47 athletes and coaches from participating at the 2018 Winter Games on Friday, saving the International Olympic Committee from welcoming individuals it had judged to be tainted by the most elaborate doping program in sports history.

The decision, delivered by the secretary general of the Court of Arbitration for Sport at a packed news conference, just hours before the opening ceremony, allowed the I.O.C. a reprieve from the legal disputes and welter of criticism linked to the Russia’s doping scandal.

The court essentially ruled that the I.O.C. had the right to decide which Russian athletes it could invite because it had already banned the country’s Olympic committee in December for its yearslong doping program that had corrupted several Winter and Summer Games.

Russia has continued to deny that it operated the doping program, whose tentacles reached to the highest levels of Russian sport, according to investigators. The panel agreed.