Olympic officials said on Sunday that all Russian athletes were tainted by the country’s state-run doping system and would not be allowed to compete in the Summer Games unless they convinced individual sports federations of their innocence.

With just 12 days before the Games begin, the International Olympic Committee said in a statement that “all Russian athletes seeking entry to the Olympic Games Rio 2016 are considered to be affected by a system subverting and manipulating the antidoping system.”

The showdown between Russia and Olympic officials was rich with intrigue beyond the playing fields in Rio de Janeiro. President Vladimir V. Putin of Russia had suggested the doping allegations were politically motivated and meant to undermine his country’s standing in the world. The Olympic leadership had been under pressure to expel a major sports power for perpetrating one of the most expansive doping programs in history and corrupting results at the Summer and Winter Games.

In the end, Russian officials received a reprieve, in their view. The Russian flag and at least some of the country’s athletes will be a part of the Rio Olympics. The burden now shifts to sports federations to vet Russia’s individual Olympic candidates.