A Russian court has released from custody opposition leader Alexei Navalny less than 24 hours after convicting him of embezzlement and sentencing him to five years in prison.
In a twist to a case that has put the spotlight on the treatment of Russia's leading opposition figures, Navalny was released after a surprise request by prosecutors. They said that because Navalny is a candidate in this year's Moscow mayoral race, keeping him in custody would deny him his right to seek election.
The release is to extend until appeals of his conviction are completed.
On Thursday Navalny was sentenced to five years in a penal colony on fraud charges, prompting global concern as the verdict disqualified one of President Vladimir Putin's fiercest critics from politics.
Russian opposition activists condemned the sentence for mass embezzlement as a blatant move to punish Navalny, 37, for opposing the Kremlin.
The United States said it was deeply disappointed and European Union states swiftly condemned the verdict, in a new diplomatic controversy that threatens to further strain ties between Moscow and the West.
Judge Sergei Blinov on Thursday found Navalny guilty of defrauding the local government in the northern Kirov region of 16 million roubles ($627,000) in a timber deal while acting as an unpaid adviser to the local authorities in 2009.
"Navalny ... committed a grave crime," said Blinov. Navalny's co-accused, Pyotr Ofitserov, was also found guilty and sentenced to four years in a prison colony.
The sentence was considered the most politically explosive judgment in Russia since anti-Kremlin tycoon Mikhail Khodorkovsky was jailed in 2005.
"So. Don't all get bored without me," Navalny told supporters in his last Twitter message from the courtroom before being handcuffed. And most importantly, don't be idle."
He then handed his smartphone to his wife, Yulia, hugged her and his mother, shook his father's hand, and was led away by bailiffs.
Yesterday, though, a smiling Navalny emerged from the caged-off defendants' section of the courtroom and thanked supporters who held protest rallies after his conviction.
Defying warnings by local authorities that unsanctioned protests would be broken up, several thousand Russians rallied in central Moscow outside the Kremlin walls and central St Petersburg to protest the verdict.
The Moscow municipality shut down Red Square, ostensibly for "repairs", in an apparent bid to prevent protests on the iconic Moscow landmark as it tried to keep demonstrators on footpaths and not roads.
About 60 people were arrested and taken away to police stations where they would likely receive administrative cautions, the Itar-Tass news agency said.
Navalny, who emerged as a powerful new political force in mass anti-Putin protests, has dismissed the charges against him as absurd and a Kremlin set-up to end his political career.
He has said he wants to challenge Putin in the next presidential election in 2018 and coined the phrase "the party of crooks and thieves" to describe the ruling United Russia party.
Prosecutors in Kirov, a sleepy city 900km north of Moscow thronged with dozens of reporters for the hearing, had sought a six-year sentence.
Anti-Kremlin activists slammed the verdict as the latest effort by Putin to snuff out the slightest hint of opposition to his 13 years of rule.
"It is completely fabricated from start to finish," said former Cabinet minister and anti-Kremlin activist Boris Nemtsov, who was in court.
Top Russian rights group Memorial said the country "now has one more political prisoner" while Amnesty International mocked what it said was "a parody of a prosecution and a parody of a trial".
Khodorkovsky, who is still in jail, said in a statement released through his lawyers that the verdict was predictable.
The last Soviet leader, Mikhail Gorbachev, said it was unacceptable to use the courts to prosecute political opponents.
On Wednesday Navalny registered to run for Moscow mayor.
His campaign chief, Leonid Volkov, said on Thursday that Navalny was pulling out of the Moscow mayor election on September 8 and would urge supporters to boycott the polls.
However, his release puts him back in the race.