Russian activist Alexei Navalny reacts as he talks to the media with his wife, Yulia, standing to his side, outside a court building in Kirov, July 19, 2013. Reuters / Sergei Karpukhin

Russian activist Alexei Navalny was freed from jail Friday, just one day after he was convicted of embezzlement and sentenced to five years in prison. The case of Vladimir Putin's most prominent voice of opposition is now pending appeal.

The local office of Russia's general prosecutor, a different authority from Russia's Investigative Committee that brought the embezzlement charge against Navalny, filed a complaint late Thursday on behalf of the anti-corruption blogger and his co-defendant, Petr Ofitserov. The complaint said Russia's criminal code doesn't allow for the men's imprisonment during the appeal process and the judge agreed.

"This decision was quite unexpected for us," Mr. Navalny told reporters outside the courthouse in Kirov following the decision. "What is happening now is a unique thing for the Russian justice system."

The decision to free Navalny came after thousands of protesters gathered in the streets surrounding the Kremlin and just ahead of this weekend's meeting of finance ministers from the Group of 20 industrial and developing nations.

The two men's release is considered temporary, and they were ordered not to leave Moscow during the appeal process, which could take months.

Navalny, 37, and Ofitserov were convicted of conspiring to embezzle $494,000 from a state-controlled timber company in Kirov while serving as informal advisers to the company in 2009. Navalny, who less than two years ago led the biggest protests to threaten the Kremlin since President Vladimir Putin rose to power, called the case politically motivated, a claim that the Kremlin denies. However, the conviction came just one day after Navalny announced his intentions to run for mayor of Moscow.

Navalny said Friday he will still consider whether to run for mayor since he should remain free through the campaign season leading up to the September election.

"I will decide whether to participate in the elections after I come back home to Moscow and visit my headquarters," he said.