Russia has been banned from competing at next year's Winter Olympics in Pyeongchang by the International Olympic Committee.
But Russian athletes who can prove they are clean would be allowed to compete in South Korea under a neutral flag.
It follows an investigation into allegations of state-sponsored doping at the 2014 Games hosted by Russia in Sochi.
The decision has been widely condemned in Russia, with some politicians urging a boycott of the Games, though other officials have welcomed the chance for 'clean' athletes to take part.
The Russian Olympic Committee (ROC) has been suspended but the IOC said it will invite Russian clean athletes to compete in February under the name 'Olympic Athlete from Russia' (OAR).
This entire investigation was instigated by whistleblowing doctor Grigory Rodchenkov, who was director of Russia's anti-doping laboratory during Sochi 2014.
He alleged the country ran a systematic program of doping and claimed he had created substances to enhance athletes' performances and switched urine samples to avoid detection.
The World Anti Doping Agency (Wada) enlisted the services of Canadian law professor and sports lawyer Dr Richard McLaren to look into the allegations.
The McLaren report concluded 1,000 athletes across 30 sports benefitted from the doping program between 2012 and 2015.
Wada obtained what it said was a Russian laboratory database which it felt corroborated McLaren's conclusions, while re-testing of Russian athletes' samples resulted in a host of retrospective bans and stripping of medals.
President of the ROC, Alexander Zhukov, said there was positive and negative news from the IOC's decision.
He welcomed the invitation for clean athletes to compete in South Korea but does not agree with the ruling that they must compete under a neutral flag.
Russian politicians and athletes were united in their condemnation of the IOC decision.
The deputy chairman of Russian parliament's defence committee, Frants Klintsevich, said Russian athletes should not take part in the Olympics in 2018 if they are not allowed to compete under the national flag.
"I don't know what Russia's decision will be in the end, but in my view, a great power can't go 'incognito' to the Olympics," state-owned RIA Novosti news agency reported him saying.
Russian bobsleigh federation president Alexander Zubkov said on Tuesday he was "shocked" by the decision.
Zubkov was stripped last month of the two gold medals he won at the 2014 Sochi Games and banned from the Olympics for life over alleged doping violations.
Russian state broadcaster VGTRK has said it will not broadcast the winter Olympic games if the Russian team is not participating.
The Olympics ban for Russia, who had finished top of the Sochi 2014 medal table, could potentially leave opportunities for gold, silver and bronze open to several other nations.
It is not yet clear how many Russian athletes, if any, will seek to compete under a neutral flag.