The ruling by the Court of Arbitration for Sport (CAS) is seen as a key indicator as the International Olympic Committee (IOC) debates whether to order a blanket ban on Russia over accusations of state-run doping.
The IOC said it will study the CAS decision before a conference call on Sunday with its executive board.
A decision on banning Russia from the Rio Games which start on August 5th could come this weekend, an IOC spokesperson said.
CAS said it had “dismissed” an appeal by the Russian Olympic Committee and 67 athletes against the suspension ordered by the International Association of Athletics Federations (IAAF).
The 67 included two time pole vault champion Yelena Isinbayeva.
The IAAF ban covers all international competition, including Rio, and follows an investigation last year which found widespread “state-sponsored” doping.
Russia is an athletics powerhouse and its team's absence from Rio will leave a gaping hole in major Summer Games competitions.
Isinbayeva called the CAS ruling a “funeral for athletics” and blasted the court based in Lausanne for issuing “a blatant political order.”
The Kremlin expressed “deep regret” over the court's decision and said it had “no legal basis.” Russia has denied any state involvement in the doping crisis.
'Level playing field'
Originally, 68 Russians had appealed against the IAAF ban but the governing body has cleared US-based long jumper Darya Klishina to compete in Rio as a neutral.
The IOC and the CAS decision said that Klishina could compete under the Russian flag.
An IOC ethics commission is to rule on the case of Yuliya Stepanova, an 800m runner who gave evidence about the doping.
The IAAF welcomed the CAS tribunal ruling.
“Today's judgement has created a level playing field for athletes,” said an IAAF statement.
“The CAS award upholds the rights of the IAAF to use its rules for the protection of the sport (and) to protect clean athletes.”
The CAS ruling has been the focus of Olympic attention, however, since an independent WADA report this week said Russia ran a “state-dictated failsafe system” of drug cheating in 30 sports at the 2014 Sochi Games and other major events.
IOC president Thomas Bach called Russia's actions a “shocking and unprecedented attack on the integrity of sport and on the Olympic Games.”
According to the report by Canadian lawyer Richard McLaren, the doping included the switching of Russian samples by secret service operatives at the 2013 world championships in Moscow.
It said the operation was directed by the sports ministry, with help from the FSB intelligence agency.
WADA, backed by the United States and other nations, has called for Russia to be completely banned from the Rio Games.
Not 'triumphant' day
The IAAF suspended Russia in November because of an earlier doping investigation which also said there was “state-sponsored” action.
It refused to lift the suspension last month, meaning no Russian athletes could take part in Rio.
Russia was the second most successful athletics nation at the 2012 London Olympics, behind the United States, with seven gold medals, four silver and five bronze.
Originally, Russia had 17 medals. But several are already at risk because of doping failures.
Olympic 3,000 metre champion Yulia Zarapova has tested positive for anabolic steroids and will almost certainly be stripped of her gold medal.
Woman's discus thrower Darya Pishchalnikova, silver medallist in London, has been banned for 10 years because of drug failures.
The IOC has not yet reconfirmed the results of the London Olympics following the retesting of doping samples.
IAAF president Sebastian Coe said the CAS ruling should not give cause for celebration.
“While we are thankful that our rules and our power to uphold our rules and the anti-doping code have been supported, this is not a day for triumphant statements.
“I didn't come into this sport to stop athletes from competing. It is our federation's instinctive desire to include, not exclude.”
He said that after the Rio Games an IAAF task force “will continue to work with Russia to establish a clean safe environment for its athletes so that its federation and team can return to international recognition and competition.”