Human rights groups are calling for the release of dozens of people arrested during an anti-government protest in Nicaragua on Sunday.

Police said that 38 people were detained in the capital, Managua, of which eight have so far been released.

The arrests came a day after the police warned that it would not allow any unauthorised protests to go ahead.

The Central American nation has been rocked by a wave of anti-government demonstrations since April.

Hundreds of people have been killed since the protests demanding President Daniel Ortega's resignation started.

The protesters were gathering for a march under the motto "United for Liberty" when riot police moved in to disperse the demonstrators.

Anti-government demonstrations were declared illegal by President Ortega on 28 September. The president also warned that organisers of unauthorised protests would face charges.

The "United for Liberty" march was one of the first public protests to have been organised since police released a statement on Saturday saying that they would to everything necessary to stop it.

'They want blood'
During a speech on Saturday, President Ortega accused the protesters of "calling for marches not for peace, but for blood, that's what they want, they want blood".

Police were out in force on Sunday and threw stun bombs and teargas canisters to disperse protesters as they gathered.

The head of the Organization of American States, Luis Almagro, demanded in a tweet [in Spanish] that the government of Nicaragua free those detained and stop repressing peaceful protests.

The president of neighbouring Costa Rica, Carlos Alvarado, called for "an urgent and immediate end to the repression in Nicaragua".

In a statement, he also demanded that Nicaraguans' legitimate right to protest and freedom of expression be respected.

The Nicaraguan government dismissed President Alvarado as "meddling" in Nicaragua's internal affairs in a statement [in Spanish].

The current wave of protests first kicked off in April when demonstrators demanded that planned changes to the country's social security system be shelved.

Following deadly clashes between the security forces and the demonstrators, the protests soon escalated and the protesters demanded that President Ortega step down.

Mr Ortega has been in power since 2007 and his critics accuse him of becoming increasingly authoritarian and restricting Nicaraguans' freedoms and civil liberties.

Daniel Ortega: From revolutionary leader to opposition hate figure
The president in turn accuses the protesters of planning a coup against his democratically-elected government and of incitement to violence.

Local human rights groups as well as the United Nations Office for Human Rights have documented alleged human rights violations which range from illegal detention to torture.