Kremlin critic Alexei Navalny lost his appeal on Saturday against what he said was a politically-motivated decision to jail him for nearly three years, but had his prison term slightly shortened.
Navalny, President Vladimir Putin's most prominent critic, was jailed earlier this month for parole violations that he said were trumped up. Western countries have condemned the case and are discussing possible sanctions on Russia.
A Moscow court swiftly rejected his appeal, while shortening his original jail term by six weeks. The original term was 3.5 years.
But, with the amount of time he had already spent under house arrest taken into account, it amounted to around two years and eight months. His lawyer said on Saturday he would now spend a little over 2.5 years behind bars.
Navalny responded sarcastically to the ruling. "They've reduced the sentence by 1.5 months. Great!" he said from a courtroom glass cage.
The opposition politician had earlier told the judge he was not guilty of parole violations as a previous court had found. Navalny returned to Russia last month from Germany, where he had been recovering from a near-fatal poisoning in Siberia in August with what many Western nations said was a nerve agent.
He said he had been unable to report to the Moscow prison service last year because he had been convalescing in Germany at the time.
"I don't want to show off a lot, but the whole world knew where I was," Navalny told the judge. "Once I'd recovered, I bought a plane ticket and came home."
Navalny said he had no regrets about returning to Russia, that his belief in God helped sustain him, and that "strength was in truth."
"Our country is built on injustice. But tens of millions of people want the truth. And sooner or later they'll get it."
Navalny is due to appear in court again later on Saturday for what is expected to be the culmination of a separate slander trial against him.
In the slander case, Navalny is accused of defaming a World War Two veteran who took part in a promotional video backing constitutional reforms last year that let Putin run for two more terms in the Kremlin after 2024 if he wants.
Navalny described the people in the video as traitors and corrupt lackeys. But he has said his comments were not specifically directed against the veteran, and that the authorities are using the charge to smear his reputation.
State prosecutors have asked the court to fine Navalny 950,000 roubles ($12,800) for slander.
Navalny's arrest and jailing sparked nationwide street protests in Russia, but his allies say they have now paused major demonstrations until the spring.
Navalny accuses Putin of ordering his attempted murder. Putin has dismissed that, alleging Navalny is part of a US-backed dirty tricks campaign to discredit him.