Police detained more than 800 people across Russia during protests against government plans to raise the national retirement age that have resulted in President Vladimir Putin’s approval ratings slumping to a four-year low.

Thousands of protesters took to the streets on Sunday in dozens of towns and cities after Alexei Navalny, the Kremlin critic, called for nationwide rallies against the pension reforms. Navalny was jailed for 30 days on 25 August on a separate protest-related charge in a move that he said was aimed at preventing him from leading the rallies on Sunday.

In Moscow, where protesters gathered on the city’s iconic Pushkin Square, about 2,500 people ignored police warnings to disperse. They chanted “Putin is a thief!” and “No increase in the pension age!” Although the demonstration was largely peaceful, violence erupted when some protesters tried to march towards parliament, where they were beaten back by police with truncheons.

The protests came as Moscow held mayoral elections that the Kremlin-backed incumbent, Sergei Sobyanin, was expected to win easily. Critics accused officials of barring genuine opposition candidates. Russians also went to the polls in regional elections.

Authorities did not give permission for the vast majority of the protests, and some Russians told the Guardian they had stayed away because they feared arrest. Dozens of members of Navalny’s opposition movement were detained before the events on charges of organising illegal rallies.

The largest number of arrests were in St Petersburg, where 354 people were detained, according to OVD-info, a website that tracks politics-related arrests.

Earlier, Navalny’s aides condemned Google after it removed his adverts from YouTube urging Russians to protest against the pension changes.

Russian officials sent a letter to Google last month asking it to block Navalny’s videos because it said they were illegal under the country’s election laws, which bar political campaigning 24 hours before elections.

Google confirmed it had pulled the videos. “We consider all justified appeals from state bodies. We also require advertisers to act in accordance with the local law and our advertising policies,” the company told the Guardian.

Alexei Navalny launched a video calling for protests against plans to raise the retirement age. Photograph: Sergei Ilnitsky/EPA

Leonid Volkov, an aide to Navalny, said Google’s decision “presents a clear case of political censorship.” He said it was the first time the internet firm had complied with a request by Russian authorities to block opposition content. He also accused officials of misleading Google: “The rallies do not have anything to do with the elections.”

Under government plans, the age at which Russians can retire and claim a state pension will gradually rise from 60 to 65 for men and from 55 to 60 for women. Putin scaled back the government’s original plans to increase the pension age for women to 63 during a televised address to the nation last month.

Around 80% of Russians are against the plans, and Putin’s approval rating dropped from 77% to 63% after they were announced in June, according to opinion polls by the independent Levada Centre pollster.

Putin, who pledged in 2005 that he would never increase the national retirement age while president, says the country risks economic collapse and hyperinflation unless urgent action is taken.

The government’s plans are widely unpopular because many Russians fear they will not live to see their pensions. Although life expectancies are rising in Russia, they are still relatively low, especially for men, for whom the average age of death is 66. Russian women can expect to live to 77, but many say widespread discrimination in the workplace means they fear being left without a job or a pension.