Alexei Navalny's lawyer called the decision to release him on bail, just a day after he was sentenced to five years in prison, as "unprecendented".
The judge in the northern city of Kirov ruled that keeping President Vladimir
Putin's opponent in custody would deprive him of his right to stand in
mayoral elections in Moscow on September 8.
The former regional governor of Kirov was charged with embezzlement and
stealing property.
The decision to imprison Mr Navalny caused thousands to protest in Moscow and
sparked an international outcry.
Addressing the court after the decision Alexei Navalny said: "I'm not any
kind of puppet ... that they can just kick out of the elections and tell me
I can't participate.
"Now we'll return to Moscow
to our headquarters and we will continue our campaign."
Mr Navalny's co-accused, Pyotr Ofitserov, who was sentenced to four years in prison, was also released pending his appeal