The Court of Arbitration for Sport announced Thursday it upheld Russia's ban from next year's postponed Tokyo Olympics, but shortened a four-year suspension to two years.

Russia's anti-doping agency RUSADA had appealed the sanctions imposed by the World Anti-Doping Agency in December last year that barred Russia's flag, anthem and country name from competitions, including the Olympics, for four years.

Russian Olympic Committee building is seen in Moscow, Russia after The World Anti-Doping Agency (WADA) handed a four-year ban to Russia for major sporting events including the 2020 Tokyo Olympics and 2022 World Cup on December 09, 2019. (Anadolu Agency/Getty/Kyodo)

While refusing to overturn the ban, the court reduced the suspension, which will now end on Dec. 16, 2022.

The suspension means only Russian athletes who meet certain criteria will be permitted to compete as neutrals at the Tokyo Olympics and Paralympics or the Beijing Winter Olympics and Paralympics in 2022. It also impacts Russia's participation in other world championships such as soccer's 2022 World Cup in Qatar.

In response, RUSADA announced it was not completely satisfied with the decision and could appeal the judgment to the Federal Supreme Court of Switzerland.

But Mikhail Bukhanov, the agency's acting head, later described the outcome as a "victory for Russia."

The decision follows a four-day arbitration hearing held last month centering on WADA's accusation that Russia tampered with drug testing data retrieved from the Moscow Laboratory in Jan. 2019.

WADA President Witold Banka welcomed the decision in a statement on the organization's website.

"WADA is pleased to have won this landmark case...The panel has clearly upheld our findings that the Russian authorities brazenly and illegally manipulated the Moscow Laboratory data in an effort to cover up an institutionalized doping scheme."

"We are, however, disappointed that the CAS panel did not endorse each and every one of our recommended consequences for the four-year period we requested. We believe they were proportionate and reasonable, but ultimately WADA is not the judge but the prosecutor and we must respect the decision of the panel," the statement read.

Japan's Olympic minister Seiko Hashimoto said in response to the decision that "Doping threatens the integrity and attraction of sport and it is unacceptable."

"We will continue to work together with related bodies and do our best to prepare for a clean games," she added.

RUSADA was initially suspended in 2015 for its role in the state-sponsored doping program that targeted various high-level competitions, including the 2014 Winter Olympics hosted by Russia in Sochi. The nation was allowed to compete at the 2016 Summer Olympics in Rio de Janeiro but was banned from taking part in the Paralympics.

Following the suspension of the Russian Olympic Committee in 2017, Russian athletes cleared of doping were allowed to participate at the Pyeongchang Games in South Korea under the banner of "Olympic Athlete from Russia."

The ruling announced Thursday specifies that Russian athletes are permitted to wear Russian colors but not the Russian flag at the Tokyo Olympics. If their uniforms bear the name of their country, it must also say "neutral athlete."

Russian President Vladimir Putin is banned from attending the next two Olympics unless he receives an invitation from the host country's head of state.

World Athletics said it will decide in March 2021 whether to allow Russian athletes who can prove they are clean to compete as neutral athletes in international athletics competitions.

Allegations of widespread Russian doping in athletics first surfaced in 2014.

The International Olympic Committee said it will "carefully evaluate" the decision and its "consequences" for the Tokyo Games and Beijing Winter Games and it will work with international federations and the International Paralympic Committee to have a "consistent approach."