Prosecutors had requested that the Moscow mayoral candidate be let go pending appeal so that he could participate in the race in the fall. The move was seen as an attempt to soothe public anger and lend legitimacy to a vote widely expected to be won by a Kremlin-backed incumbent.
The popular blogger who has exposed high-level corruption and mocked the Kremlin would not immediately say if he would stay in the race, expressing resentment over what he characterized as political manipulation.
After the decision, he emerged from the caged-off defendants' section of the courtroom. He hugged his wife, and thanked the several thousand supporters who had protested his conviction on Manezhnaya Square next to the Kremlin, clapping hands and chanting "Freedom!" and "Putin is a thief!"
Dressed in a black T-shirt and jeans, he said his release was a result of Thursday's protests. He claimed his conviction and sentence "had been vetted by the presidential administration ... but when people came out on Manezhnaya, they rushed to go back on that decision."
Judge Ignatiy Embasinov supported the release, saying that Navalny's incarceration would "prevent him from exercising his rights of being elected," to cheers from Navalny's supporters.
The release comes with the condition that Navalny not travel outside Moscow and extends until appeals of his conviction are completed.
Navalny's lawyer Olga Mikhailova described Friday's ruling as unprecedented in Russia. Outside the court, Navalny was greeted by supporters, one of them offering him blini -- Russian pancakes -- a sarcastic play on the name of the judge who sentenced him, Sergei Blinov.
Navalny said it's "impossible to predict" whether Friday's decision could raise the chances of his acquittal on appeal. He also said he has not yet decided whether to continue his mayoral campaign.
"I'm not some kitten or a puppy that can be thrown out of election, say, 'you're not running' and later say 'yes, let's get him back in.' I will get back to Moscow and we will talk it over with my election headquarters," he said.
Presentation of the appeal and the decision by the court for the Kirov region took little more than an hour, a sharp contrast to the droning 3 Â½-hour verdict reading and sentencing in a lower court the previous day.
That harsh ruling provoked immediate anger. The U.S. and EU both criticized the ruling within hours, arguing that the case appeared to be politically motivated.
The protest rally briefly blocked traffic on a busy Moscow street, as demonstrators shouted "This city is ours!" Police rounded up several dozen demonstrators, but didn't move to disperse the rally that went on for several hours.
Navalny rose to prominence among the opposition during a series of massive protests in Moscow against Putin's re-election to a third presidential term in March 2012.
He first earned notice by blogging about his investigations into corruption at state-owned companies where he owned shares, reaching hundreds of thousands of people. He and his team of lawyers and activists have plumbed property registers abroad to identify top officials and lawmakers who own undeclared foreign assets and hold foreign citizenship.
Navalny's blog quickly became an Internet sensation not only because of his exposures but because of its engaging illustrations, funny images and witty catchphrases. It was Navalny who first called the dominant United Russia party "the party of crooks and thieves," a phrase that still dogs Kremlin loyalists.
The opposition leader's investigations targeted a wide circle of Putin loyalists -- from members of Parliament to state bankers -- threatening to discredit the system of governance he has built.
Associated Press writer Jim Heintz in Moscow contributed to this report.
Copyright 2013 The Associated Press.