These days, Moscow looks as though it is under occupation by enemy troops.

Tens of thousands of security personnel in full gear have been blocking off main streets in the city centre. Residents have been unable to go almost anywhere without being stopped at various checkpoints and asked to show their IDs.

Just a few weeks ago, no one would have guessed that the rather banal electoral procedure of choosing deputies for the Moscow city council, which has very few powers, would lead to a near-revolutionary moment.

In mid-July, local authorities disqualified all independent candidates who tried to register for the elections scheduled for September 8. The reasons varied: Some were refused registration because they supposedly made mistakes on the official forms when they were collecting signatures and others because they allegedly submitted fake signatures – this despite the fact that some citizens came in person to the authorities and confirmed that their signatures were genuine.

If the Kremlin had allowed a few opposition candidates into the Moscow council, they would not have posed such a large threat. Instead, it not only blocked them from contesting the election but also escalated the situation. The local authorities refused to grant permission to opposition leaders to hold a protest in the city centre, which further provoked the public.

As a result, on July 27, tens of thousands of Moscow residents took to the streets to demand that independent candidates be allowed to run in the local election.

The Kremlin, perhaps, did not expect such public uproar. Independent candidates have, for years, been barred from running in city elections without it causing any public protests. The situation was the same in other cities, including St Petersburg, where independent candidates have also been disqualified.

After July 27, it became clear that local elections have become a way for Russians to express their growing dissatisfaction with those in power, which was reflected in some of the slogans protesters were chanting that day, including: “Russia will be free!”, and “Down with the secret police!”.

Threats of violent disruptions by paid hooligans and summons for army services targeting young men attending the protest also did not dissuade people from taking to the streets. On August 3, another major demonstration was held, again attracting large crowds of Moscovites.

The marches remained overwhelmingly peaceful but the police responded with brutality. They were not only beating and arresting protesters but also sweeping up random bystanders, tourists and even reportedly members of the “E” centre of the secret police, whom they could not distinguish from the regular protesters. In total, a record number of 1,400 people were arrested on July 27, and 1,000 on August 3.

But that was not enough for President Vladimir Putin. The authorities have now started court cases against protesters for causing “mass riots”. One of them is Egor Zhukov, a student in the Higher School of Economics (HSE) in Moscow. He has been accused of “organising” the riots because in one video he appeared to tell protesters walking behind him to turn right. Another accused “organiser” is Sergei Abanichev, who apparently threw a paper cup at the police. Many others have been arrested on similar charges and are now facing up to 8 years in prison.

On August 3, it was also announced that the prosecution has charged the Anti-Corruption Fund of opposition leader Alexei Navalny with laundering close to one billion rubles ($15.3m). The fund, which focuses on exposing corrupt practices of Russian officials, receives large donations from thousands of private citizens who support its work on a regular basis. This fact, along with the evidence that will be produced in defence of Navalny and his staff, is unlikely to affect the outcome of the court case. After all, this is meant to be an intimidating measure meant to scare the opposition into silence.

But for every action, there is an equal and opposite reaction. People are getting ready for a third major protest despite the authorities’ refusal to grant permission for it. Various public figures are increasingly expressing their support for the protesters, including former top tennis player Yevgeny Kafelnikov who himself attended the demonstrations. Rock icon Andrei Makarevich and rapper Noize MC even dedicated songs to the protesters, criticising the police brutality they faced.

Tensions are also on the rise on university campuses. After Zhukov’s arrest, fellow students from the HSE organised individual pickets in his support. Even the vice-rector of the school, Valeria Kasamara, who herself is running in the election, announced her readiness to be his guarantor so he is allowed to await his trial under house arrest, rather than in a detention centre.

What will happen next is anybody’s guess, but there seem to be at least two scenarios. Either the Kremlin will be able to put down the protests by force and the Russian public will eventually slip back into its political lethargy, or the situation will escalate, especially if Navalny is sentenced to jail, and protests will spread outside Moscow to the country’s various regions.

If the second scenario plays out, Putin, whose political philosophy for the past 20 years has been to never make any concessions, would have only one way out: To call a national emergency and unleash a nation-wide campaign of repression, arresting thousands of people, including journalists, human rights activists, lawyers and NGO workers – a crackdown similar to the one in Turkey after the 2016 attempted coup.

The actions of the local authorities over the past few weeks indicate that the president could indeed be very close to pursuing the second scenario. Would that help him cling to power? Only time will tell.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.