Helmeted riot police armed with batons and shields on Saturday clashed with rock- and chair-throwing protesters who tried to march in defiance of Algeria's ban on public gatherings.
At least 19 people were injured, the government said, but an opposition party official put the figure at more than 40.
Algeria has been among the many North African and Middle Eastern countries hit by shows of resistance against their autocratic leaders after a young Tunisian man set himself on fire last month, triggering a wave of protests that led Tunisia's longtime strongman to flee the country.
Protest organizers at the democratic opposition party RCD draped a Tunisian flag next to the Algerian flag on a balcony of party headquarters where the march was to begin in the capital, Algiers.
Riot police, backed by a helicopter and crowd-control trucks, ringed the exit to ensure marchers couldn't leave the building — and striking those who tried to come out to take part. Outside, some young men waved the national flag and chanted "Assassin Power!"
"I am a prisoner in the party's headquarters," said Said Sadi, a former presidential candidate who leads the Rally for Culture and Democracy party, said through a megaphone from a balcony window.
Demonstrators shouted "Boutef out!" referring to President Abdelaziz Bouteflika — echoing cries against Tunisian President Zine El Abidine Ben Ali before he fled Jan. 14 to Saudi Arabia amid huge street protests in Tunisia.
Some would-be marchers reportedly scuffled with police along the planned march route in Algiers.
"They indeed stopped us from marching, but politically, we have succeeded in breaking the wall of fear," RCD lawmaker Mohamed Khendek said. He said the party's task now is to broaden the movement.
The Interior Ministry said 19 people were hurt — eight police officers and 11 demonstrators and passers-by, the state news agency APS reported. The ministry estimated the crowd at around 250 people and said everyone who was injured was treated at the scene.
The ministry, in a statement, said "stones, chairs and blunt instruments were thrown toward security force agents out of the windows at the party headquarters," APS reported. Nine people were detained, including some for possession of banned knives, the ministry said.
A party spokesman, Mohcine Belabbas, said that 42 protesters were taken to hospital for treatment of injuries. The party's leader in parliament, Atmane Mazouz, was hit in the face with a police baton.
Algeria's government in 2002 enacted law banning public gatherings, a move largely targeting Islamic militants involved in a bloody insurgency that erupted in the country a decade earlier.
The regional government for Algiers denied the RCD's request for an authorization to demonstrate, the official news agency said.
Protesters in countries like Algeria have set themselves on fire in apparent attempts to copy Mohammed Bouazizi, a 26-year-old Tunisian whose self-immolation helped inspire the protests that brought down Ben Ali.
Earlier this month, two demonstrators died in unrest over rising food prices, and the government responded by announcing it would cut the cost of sugar and cooking oil. Some self-immolations have been reported in Algeria.
Algeria has had a simmering Islamic movement, and al-Qaida's north African branch was born on the remains of a radical Muslim group that had fought against the military-backed government.