KIROV, Russia (AP) -- A court's abrupt decision Friday to release Russia's most charismatic opposition leader less than a day after handing him a five-year prison sentence appears to reflect confusion in President Vladimir Putin's inner circle about how to deal with its No. 1 foe.
Even more, it makes clear that the Kremlin is far from a monolith. The surprising about-face involving Alexei Navalny highlights an open rift between factions in Putin's government that could be as unsettling for the leadership as any opposition figure, experts say.
In an unusual move, prosecutors themselves had requested that Navalny, an anti-corruption blogger and Moscow mayoral candidate, be let go pending appeal just a few hours after he was led out of a courtroom in handcuffs following an embezzlement conviction that was widely seen as unfair.
The decision came as thousands of Navalny's supporters gathered Thursday around Moscow's Manezhnaya Square outside the Kremlin for an unsanctioned protest of what they called a politically motivated ruling, chanting "Freedom!" and "Putin is a thief!" in open defiance of the authorities.
Navalny himself credited the protesters with his release, telling reporters Friday that 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."
Analysts saw Navalny's sudden release as likely reflecting arguments within the Kremlin about how to respond to his popularity. He has earned rock-star status among his urban middle-class supporters, even if he has little influence among everyday Russians.
They also saw the move as an attempt to lend legitimacy to the Sept. 8 mayoral vote widely expected to be won by a Kremlin-backed incumbent who resigned last month, forcing a snap election that would make challengers scramble to organize their campaigns.
While the leadership of Russia's law-enforcement agencies, referred to as "siloviki," favor nipping the opposition in the bud, other Putin lieutenants promote a more subtle approach to dissent, said Alexei Makarkin, an analyst with the Moscow-based Center for Political Technologies, an independent think-tank.
"Siloviki believe that the opposition must be destroyed," Makarkin told The Associated Press. "And people in charge of policymaking think that the radical opposition poses no immediate threat and could be allowed to take part in elections, giving them legitimacy.
"These two approaches have led to contradictory decisions made almost simultaneously, and, in the end, those who wanted to legitimize elections prevailed," he added.
Navalny was a driving force behind a series of massive demonstrations in Moscow against Putin's re-election to a third presidential term in March 2012.
But Navalny's popularity outside of urban centers has remained negligible, and a recent opinion survey by the respected independent Levada Center showed that even in Moscow, he has the support of only about 5 percent of respondents.
Navalny said it's "impossible to predict" whether the move to set him free 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 an 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.
Incumbent Sergei Sobyanin, who is relatively popular thanks to lavish efforts to spruce up the capital, is widely expected to win the race easily. After rising through the Siberian political ranks, he became Putin's chief of staff before being named Moscow's mayor, cementing Kremlin control over the city's political and business interests.
He was the one who persuaded Putin to release Navalny, said Stanislav Belkovsky, a well-connected political strategist who once advised the Kremlin. The rally of several thousand who defied a ban on unsanctioned protests in support of Navalny may have strengthened Sobyanin's hand in arguments with his Kremlin opponents.
"Sobyanin needs Navalny to make the mayoral elections look legitimate," Belkovsky told the AP. "He suffers from a provincial complex, and he wants to prove to Moscow's residents that his election victory is honest."
Belkovsky predicted that Navalny could win between 15 percent and 20 percent of the vote, but would likely be sent to serve his sentence after the election. The about-face reflects growing chaos at the top, he said.
The confusion apparently resulted from law-enforcement agencies winning Putin's approval for a five-year prison term just as Sobyanin was lobbying for a delayed sentence, Belkovsky said. The courts are widely considered to be at Putin's disposal.