More than 1,000 people were detained at anti-government protests across the country in what the Kremlin on Monday called a legitimate response to unauthorized rallies.

The OVD-Info group, which tracks police detentions and posts the names of the detainees on its website, said that 1,018 people were detained during Sunday's demonstrations against a government plan to increase the ages at which Russians collect their state pension.

Nearly half of those detained were rounded up in St. Petersburg, according to the OVD-Info. Russia's second-largest city arguably saw the most robust response with riot police charging at protesters with batons. Minors and elderly people were among those arrested.

President Vladimir Putin's spokesman, Dmitry Peskov, said the police acted in accordance with the law in response to unauthorized protests. He added that "hooligans and provocateurs" mixed up with protesters and assailed police.

In Moscow, authorities charged two men with assailing police.

On Monday, several activists tried to launch another protest in a tree-lined boulevard in central Moscow but they were quickly rounded up by police.

Sunday's rallies, which had been called by opposition leader Alexei Navalny, were held in dozens of towns and cities across Russia.

Navalny, the anti-corruption activist who is Putin's most visible foe, had called for protests against the government's pension proposal before he was sentenced to 30 days in jail for organizing an unsanctioned January protest over a different issue.

The government's plan calls for the eligibility age for retirement pensions to be raised by five years, to 65 for men and 60 for women.

It has irked both older Russians, who fear they won't live long enough to collect significant benefits, and younger generations worried that keeping people in the workforce longer will limit their own employment opportunities.

The government's proposal has dented Putin's popularity. The president responded by offering some concessions, but argued that the age hike is necessary because rising life expectancy in Russia could exhaust pension resources if the eligibility age remains the same.