Dozens of people were arrested Sunday in Moscow during a protest to demand that independent candidates be included on the ballot for local elections in September, police and a monitoring group said.

Many of those detained were allies and supporters of Russian opposition leader Alexei Navalny.

The organisation OVD-Info, which monitors arrests during demonstrations, said 38 people had been arrested, while the police acknowledged "more than 25" detentions.

Almost 2,000 people had protested in the central Pushkin Square against an alleged bid by city authorities to prevent independent candidates from running for office.

The unauthorised protest was organised by a group of candidates including supporters of Navalny.

Police initially opted not to break up the rally. Candidates have the right to organise meetings with the electorate without sound amplification or banners.

Russia is to hold nationwide elections for local and regional legislatures in September.

Protesters say the electoral authorities have falsely accused them of faking signatures required for independent candidates to stand in September polls.

In Russia, candidates outside the large parliamentary parties must gather large numbers of signatures from supporters to be allowed to stand. The signatures are then checked for authenticity by the electoral commission.

"Across the whole of Moscow now, they are removing independent candidates," said opposition politician Ilya Yashin, a local councillor who backs Navalny.

"Starting from tomorrow, the electoral commission will start removing us all from the election," Yashin said before she was arrested.

Protesters took it in turns to knock on the heavy wooden door of the mayor's office on the city's main Tverskaya street to demand candidates be allowed to stand. No one opened up.

Around a thousand protesters then rallied outside the city electoral commission.

Another of the arrested candidates, Lyubov Sobol, on Saturday declared a hunger strike after she was told the number of allegedly fabricated signatures backing her candidacy exceeded the permitted proportion.

Moscow city electoral commission said in a statement Sunday that more than 700 of 4,940 signatures backing Sobol were "invalid".

"They are stealing these elections, they are stealing our future," Sobol warned.

"I won't retreat… I will stand and fight until the end" she told a cheering crowd.

Elections for Moscow city parliament are being contested by high-profile opposition politicians who aim to capitalise on a mood of public discontent and falling approval ratings for President Vladimir Putin.