A Moscow court has rejected Russian opposition leader Alexei Navalny's appeal against his prison sentence.
Earlier this month, Navalny was sentenced by a lower court to two years and eight months in prison for violating terms of his probation while recuperating in Germany.
A judge at Moscow City Court ruled on Saturday a month-and-half Navalny spent under house arrest in early 2015 will be deducted from his prison sentence.
That slightly reduced his sentence to about two-and-a-half years.
The ruling came even as the country faced a top European rights court's order to immediately free the Kremlin's most prominent foe.
Navalny, 44, an anti-corruption crusader and President Vladimir Putin's most vocal critic, was arrested on January17 upon returning from Germany, where he spent five months recovering from a nerve-agent poisoning he blames on the Kremlin.
Russian authorities have rejected the accusation.
His sentence stems from a 2014 embezzlement conviction Navalny has rejected as fabricated and the European Court of Human Rights has ruled to be unlawful.
The Russian government rebuffed the European court's demand on Tuesday to free Navalny immediately, describing its ruling as unlawful and "inadmissible" meddling in Russia's affairs.
The Moscow City Court was considering Navalny's appeal against a lower court ruling that sentenced him to two years and eight months prison for violating terms of his probation while recuperating in Germany.
He will also face proceedings in a separate case on charges of defaming a World War II veteran.
Navalny, who called the 94-year-old veteran and other people featured in a pro-Kremlin video "corrupt stooges", "people without conscience" and "traitors," has rejected the slander charges and described them as part of official efforts to disparage him.
Navalny's arrest and imprisonment have fuelled a huge wave of protests across Russia.
Authorities responded with a sweeping crackdown, detaining about 11,000 people, many of whom were fined or given jail terms ranging from seven to 15 days.
Russia has rejected Western criticism of Navalny's arrest and the crackdown on demonstrations as meddling in its internal affairs.
In Tuesday's ruling, the ECHR ordered the Russian government to release Navalny, citing "the nature and extent of risk to the applicant's life".
The Strasbourg-based court noted Navalny has contested Russian authorities' argument that they had taken sufficient measures to safeguard his life and well-being in custody following the nerve agent attack.
In the past, Moscow has abided by the ECHR's rulings awarding compensations to Russian citizens who have contested verdicts in Russian courts but it never faced a demand by the European court to set a convict free.