Russia's opposition leader Alexei Navalny has been sentenced to 30 days' administrative arrest for repeatedly violating the law on staging rallies.
He was detained at his home in Moscow earlier on Monday, ahead of anti-corruption demonstrations in Russia.
Hundreds of people were held during the gatherings across the country.
Riot police in central Moscow were picking protesters out of the crowd at random, a BBC correspondent at the demonstration has said.
A court in Moscow announced its verdict late on Monday, rejecting demands by Alexei Navalny's defence lawyers to drop the case.
The 41-year-old opposition leader later confirmed this in a tweet on his Twitter page (in Russian).
Navalny, who intends to stand for the Russian presidency next year, had been due to attend the unauthorised rally in the capital earlier on Monday.
OVD-Info, an independent NGO, said that 825 people had been detained at the protest in the capital.
Police in Moscow say about 5,000 took part in the demonstration there, Interfax news agency reports.
OVD-Info also said that hundreds of people were held in St Petersburg.
Russia's interior ministry says about 3,500 people attended the protest in the north-western city, and 500 were detained.
In a live broadcast by the Russian liberal TV channel, Dozhd, protesters in St Petersburg could be heard shouting ‘shame’ as they were detained by police. Among those arrested was Maxim Reznik, the city's legislative assembly deputy.
Prominent activist Daniil Ken said he was arrested as he left his home in St Petersburg. He urged people to join the rally at the city's Champ de Mars square. ‘Go for me, please!’ he tweeted. He has since been released.
Police had earlier detained several people at demonstrations in the cities of Vladivostok, Blagoveshchensk and Kazan.
Navalny called on Russians to take to the streets on Monday - Russia Day - to express their anger at alleged corruption at the highest levels.
The anti-corruption campaigner uses YouTube, tweets and blogs to reach new audiences.
A video posted in March accuses Russian prime minister Dmitry Medvedev of accumulating a vast private fortune. Medvedev denies the claims. The video, which includes the accusation that the PM has a duck house on one of his properties, has been viewed nearly 23 million times.
In a call for people to join him on Monday, Navalny wrote: ‘I want changes. I want to live in a modern democratic state and I want our taxes to be converted into roads, schools and hospitals, not into yachts, palaces and vineyards.’
Navalny was earlier granted permission to hold a rally at Sakharova Avenue but changed the location - without permission - on the eve of the demonstration to Tverskaya Street, near the Kremlin.
The protest was called over government plans to demolish Soviet-era apartment blocks in the city.
Permission was granted for demonstrations in 169 locations across the country, some of which were broadcast live on the Navalny Live YouTube channel.
The protests coincided with a series of official events - including festivals, concerts and military enactments - taking place across the country to mark Russia Day, the national holiday dedicated to the 1990 declaration of sovereignty.
Similar rallies led by Navalny in March led to hundreds of arrests.
Those protests were the largest since 2012, drawing thousands of people - including many teenagers - to rallies nationwide, angered by a report published by Navalny that accused prime minister Dmitry Medvedev of corruption.
Want stories like this in your inbox?
Sign up to exclusive daily email
More Stories from Asia