Thousands of people took part in anti-corruption protests across Russia on Monday in a new show of defiance by an opposition that the Kremlin had once written off as ineffectual and marginalized.

Hundreds were arrested, including opposition leader Alexei Navalny, who was seized outside his Moscow residence while on his way to an unsanctioned rally in the city centre. Navalny will spend 30 days in jail for staging the unsanctioned protest.

The judge at the Simonovsky district court ruled after midnight Monday that Navalny should be jailed for repeated violations of the law on public gatherings.

Arrests continued in the capital throughout the afternoon, although there were no immediate figures on how many were detained.

In St. Petersburg, an Associated Press reporter counted about 500 people forced into police buses.

Demonstrations of several hundred to more than 2,000 were reported in cities across the sprawling country, from Petropavlovsk-Kamchatsky in the far northeast to Russia's European heartland.

The demonstrators appeared to skew predominantly younger — those who were born or grew up during Vladimir Putin's 17 years of leading Russia. Similar crowds turned out on March 26, rattling officials who had perceived the younger generation as largely apolitical.

Although it was not immediately clear if Monday's protests were larger in aggregate than the March demonstrations, the rallies underlined the deep dismay with the government. Putin is expected to seek another term in 2018, and Navalny has already announced his intention to run.

Riot police detain a man during an anti-corruption protest organized by opposition leader Alexei Navalny, on Tverskaya Street in central Moscow on Monday. (Maxim Shemetov/Reuters)

With opposition sentiment strong or even growing, authorities appear to be casting about for a strategy to undermine the opposition without provoking higher animosity.

Moscow officials had agreed to allow Navalny's rally, but late Sunday, he called for a different location, saying official interference had prevented contractors from erecting a stage at the planned venue.

'Kremlin's decision'

"This is not our decision. This is the Kremlin's decision," he declared.

Instead, he urged demonstrators to gather on Tverskaya Street, a main Moscow avenue that was closed to traffic for a celebration of the national Russia Day holiday that included people dressed up in various costumes from the country's history.

At one point, some demonstrators climbed atop a tent that was part of the festivities as men dressed like Russian medieval warriors looked on.

Alexei Navalny, Russia's opposition leader, was detained in Moscow on Monday en route to a protest, his wife said. (Sergei Karpukhin/Reuters)

Navalny, who faces a possible 15-day jail sentence on charges of disobeying police, rose to prominence for detailed open-source investigations into government corruption. That was a key issue for protesters Monday, particularly his report on vast wealth allegedly acquired by Prime Minister Dmitry Medvedev.

"We are against the corruption that is costing the future of our young people," said Moscow protester Maria Badyrova.

Alexei Borsenko, a Vladivostok demonstrator who eluded a police attempt to detain him, cited Iceland's prime minister stepping down in the fallout from the "Panama Papers" scandal, while "our prime minister is caught on such big corruption cases and he doesn't go anywhere."

Protests were held across Russia from Petropavlovsk-Kamchatsky in the far northeast to Russia's European heartland. (Maxim Shemetov/Reuters)

"This is very strange," Borsenko added. "It's a dead end for the country's development."

But the popular anger has spread beyond Medvedev, with many of Monday's demonstrators chanting: "Putin is a thief."

Navalny was jailed for 15 days after the March protests. In April, he suffered damage to an eye after an attacker doused his face with a green antiseptic liquid.