MOSCOW -- Not even 24 hours after a judge ordered him handcuffed and imprisoned to begin a five-year sentence for embezzlement , the Russian political opposition leader, Aleksei A. Navalny, walked free -- temporarily, at least pending an appeal.
It was a head-spinning turn that gave Mr. Navalny new grounds to challenge the authorities, thrilled his supporters -- prematurely, perhaps, as he remains convicted of a serious crime -- and set off speculation about the government's motivations and goals in jailing and then freeing President Vladimir V. Putin's chief antagonist. His release was requested by the very same prosecutor who asked that he be locked up in the first place.
Supporters of Mr. Navalny insisted that an unsanctioned rally on Thursday evening by thousands of people in Manezh Square near the Kremlin, blocking traffic and chanting "Freedom!" and "Navalny!" had forced officials to let him go. Other commentators and analysts said his release reflected disagreement and disarray at the highest levels of government.
"First, they rush to their goal, their tongues hanging out to condemn Navalny," Nikolay Svanidze, a historian and a journalist, wrote on the Ekho Moskvy news site, "to put him into irons right in the courtroom."
"Later when it happened they themselves were scared; they got scared of a few thousand people spontaneously coming out in the streets," Mr. Svanidze continued, adding that the Kremlin seemed divided into two groups, one favoring jail, the other leniency. "Or, more likely," he wrote "there are no groups, but there is an internal split, in other words schizophrenia, and impulsive actions instead of well-judged actions."
The official reason given by prosecutors for the release was Mr. Navalny's recently declared candidacy for mayor of Moscow -- a campaign that he and his aides said he would now be able to continue. But if his conviction is not reversed on appeal, Mr. Navalny cannot hold public office, raising a possibility that he was freed to lend legitimacy to the race, with no real chance of him ever serving as mayor.
Sergei S. Sobyanin, the incumbent mayor who is heavily favored to win re-election in the Sept. 8 balloting, seemed to lend some credence to that theory on Friday. Rather than quietly enjoying the downfall of a popular rival, Mr. Sobyanin said he favored Mr. Navalny's participation, and that the court proceedings should not interfere.
"I think it would be wrong to remove any of the candidacies," the silver-haired Mr. Sobyanin said in a television interview. "We have spent a lot of effort so that Muscovites had the right to a choice, the maximal choice, and to register among others, Navalny's candidacy. So I consider it necessary to do everything so that all registered candidates continue to participate."
Despite Mr. Sobyanin's remarks, the inherent risk of giving Mr. Navalny a prominent platform in Moscow politics fueled rampant guessing about what other machinations may be at work. One possibility was that the authorities were following a long pattern of slight backtracking in politically charged verdicts that can blunt criticism at home and abroad.
In many such cases, the maximum possible sentence is widely publicized, prosecutors ask for a slightly reduced sentence, and the judge may impose even less. In the end, though, the result is a criminal conviction. This was the case, for example, with the girl Punk band Pussy Riot, in which one defendant was spared jail time and two others received less than the maximum, though still harsh, sentences. Nonetheless, once convicted and imprisoned, release from jail is virtually unheard of.
The pattern appeared to emerge with Mr. Navalny, who along with a co-defendant, Pyotr Ofitserov, was convicted on Thursday of stealing nearly $500,000 for a state-controlled timber company in Kirov, a regional capital 600 miles north of Moscow -- charges that had originally been thrown out by local investigators as baseless but were revived by federal officials.
Mr. Navalny and Mr. Ofitserov had faced up to eight years in jail; the prosecution asked for six years and a fine. On Thursday, Mr. Navalny was sentenced to five years and Mr. Ofitserov to four years. They were each fined more than $15,000.
Mr. Navalny was handcuffed and led out of the courtroom after hugging his wife, Yulia.
On Friday, however, Yulia Navalny was all smiles as her husband walked free after a brief proceeding in which he and Mr. Ofitserov sat in the glass-enclosed cage often used to hold defendants in Russian criminal proceedings. Mr. Navalny, asked if he had a statement, could not help poking at the prosecutor.
"I request that you verify the identity of Prosecutor Sergei Bogdanov," Mr. Navalny told the judges. "It's possible that it is not Prosecutor Bogdanov but his double. Because it was namely Prosecutor Bogdanov demanded that I be arrested in the courtroom."
If there was any agreement on Friday among lawyers, experts and other commentators, it was that even for the Russian justice system, which can seem notoriously unpredictable and capricious, Mr. Navalny's release was a remarkable twist.
Vadim Kobzev, one of Mr. Navalny's lawyers, said that in his entire career, he had never encountered such a development. He called Mr. Navalny's release "a clearly political decision."
Gleb O. Pavlovsky, a political consultant who previously worked with the Kremlin, wrote in a blog post that the conviction and sentencing would strengthen Mr. Navalny politically.
"From now on, he will not be an Internet figure, but an all-Russia political figure," Mr. Pavlovsky wrote. "Reaction to the verdict may become much stronger than reaction to his activities, and this is irreversible. this guilty verdict is one of the worst decisions made by the authorities this year." Outside of the courthouse in Kirov, Mr. Navalny himself remarked on the strange circumstance of having the prosecution request his release. "We understand perfectly that what just happened is a completely unique phenomenon in Russian jurisprudence," Mr. Navalny said. "Nothing like this has happened to anyone else."
He also said he recognized that his freedom might be short-lived. "Even if we have just a couple more months to fight," he said. "We will fight."
Ellen Barry and Andrew Roth contributed reporting.world
This article originally appeared in The New York Times.