Russian President Vladimir Putin has largely defeated the opposition that rose against him during the attempted “Snow Revolution” of 2011 and 2012. Now a mayoral election is giving him the opportunity to retake Moscow, the city that led the revolt.

The Moscow election, scheduled for September 8, is crucial for several reasons. The capital was the only district Putin failed to win in the March 2012 presidential vote, despite officials’ widely documented efforts to rig the result. The mayoral contest itself is happening because Dmitry Medvedev restored regional elections as a concession to protesters when he was president. A victory for a Kremlin-backed candidate would undermine the legitimacy of the opposition leaders who have claimed Moscow’s streets, leading tens of thousands on anti-Putin marches, sometimes in defiance of official bans.

Putin’s candidate, Sergei Sobyanin, surprised the opposition last week by announcing that he would resign his appointed post as the city’s mayor, forcing an early election. Sobyanin’s move leaves his opponents with only a few months to mount a campaign, all but ensuring he will return to what is arguably the highest elected office in Russia after the presidency. Lest anything be left to chance, Sobyanin’s most serious rivals are likely to be disqualified from running at all.

The primary potential contender was Mikhail Prokhorov, the billionaire owner of the Brooklyn Nets who ran against Putin in last year’s presidential election. Prokhorov took second place in Moscow with 20 percent of the vote to Putin’s 47 percent. But he announced on June 13 that he wouldn’t be entering the mayoral race, citing a law banning candidates with foreign assets. He also quashed speculation that his sister Irina Prokhorova, a highbrow book publisher popular in cultural circles, would run in his place.

Another possible opponent is anti-corruption blogger Alexei Navalny. He has a loyal following in Moscow and was one of the more uncompromising leaders of last year’s protests, repeatedly getting detained for pushing the envelope during rallies and marches. As far back as 2010, well before the mass protests, respondents to an online poll by the daily Kommersant newspaper gave Navalny 45 percent of the mayoral vote compared with less than 3 percent for Sobyanin.

In real life, Navalny faces a tougher battle. He is now standing trial in the provincial city of Kirov on flimsy charges of conspiring to steal lumber from a state-owned company. If he is convicted, which is highly likely, Russian electoral law will prevent him from running.

Any candidates who overcome the initial obstacles will then face the “municipal filter,” which requires contenders in regional elections to secure the support of a certain number of local council members. In Moscow the number is 110, a tall order given that the capital’s local councils are packed with members of the ruling United Russia party, which has backed Sobyanin.

“At this stage, inconvenient candidates can be cut off if pressure is put on the councilmen,” the Rosbalt news service quoted Boris Nemtsov, a leader of the party that nominated Navalny, as saying.

Even if Prokhorov and Navalny are allowed into the race, they might not stand much of a chance because the incumbent is genuinely popular. Most polls suggest Sobyanin’s approval rating is greater than 50 percent. Russian media have cited a recent poll by Moscow State University’s Social Systems Institute that gave Sobyanin 54 percent of the vote if the election were held immediately, with Prokhorov receiving 12 percent and Navalny a mere 2 percent.

In his 31 months in power, Sobyanin has sought to turn Moscow into a more European city. Parks including Gorky Park have received facelifts. Museums and theaters have been modernized. A city-financed bicycle rental program, on the Paris model, started operating in downtown Moscow. Ramshackle street kiosks selling beer and cigarettes have disappeared. New public transportation lanes have appeared to help buses get through Moscow’s perpetually clogged avenues. Paid parking has eased congestion within Moscow’s central Boulevard Ring.

Sobyanin has had his share of setbacks. Public transport has not improved much. The Moscow subway system, normally highly reliable, has suffered from crippling accidents including a fire that temporarily took one of the lines out of commission. The city had to abandon a program to repave pedestrian walkways with tiles, which were sloppily laid and provoked outrage among Moscow women, fond of wearing high heels.

On balance, though, the mayor’s moves have mollified the “angry urbanites” who were active in last year’s protests. Usually publicity-shy, Sobyanin gave a long interview to the daily Moscow News in late May, choosing to meet with journalists at Jean-Jacques, an iconic downtown cafe popular with protest-minded intelligentsia.

“Call me what you like, the main thing for me is to make things run,” Sobyanin said. “I have never considered myself to be of the left or of the right. I have always considered myself someone who aims to solve a problem no matter what color it is.”

Columnist Boris Grozovsky, an opposition supporter, compared Sobyanin favorably with his predecessor, Yury Luzhkov. “He is doing exactly what advanced Muscovites expected from Luzhkov ten years ago,” Grozovsky wrote on Forbes.ru.

“Compared to Luzhkov, I am much happier with Sobyanin,” Jean-Jacques owner Dmitry Borisov told Echo Moscow radio. “There is at least some idea of the city as a place of relative freedom where people are able to do something if they want to.”

Given the perception of Sobyanin as a sober, competent mayor, the opposition has little to offer in terms of a credible alternative. Voters want someone who will tame traffic and keep the parks clean, not wage a war on the Kremlin. Some even see the lack of competition for the mayoral post as a blessing. “It would be tough for a mayor contesting a 100 percent democratic election to start fining people for bad parking and for leaving garbage in parks,” columnist Alexander Baunov wrote on Slon.ru. “In a democratic election, it would be easier to say that all fines are abolished. But that is not our scenario yet: We are not going to see the kind of election where that would be required.”

Sobyanin’s victory in September will seal a silent pact between Putin and the majority of Muscovites: No matter how much they dislike the man in the Kremlin, they’ll have to live with him if they want to keep their city running.

(Leonid Bershidsky, an editor and novelist, is Moscow correspondent for World View. Opinions expressed are his own.)

To contact the writer of this article: bershidsky@gmail.com.

To contact the editor responsible for this article: Mark Whitehouse at mwhitehouse1@bloomberg.net.