At least 20 people have been injured - including seven police officers - in clashes between riot police and protesters in Madrid.
Police had stopped the demonstrators, known as "the indignants", from entering a square which has become a focus of anti-government protests.
Witnesses said police charged into a crowd outside the interior ministry.
Correspondents say it was the most serious incident since the protest movement began in mid-May.
The indignants are complaining about the government's handling of the economy and high unemployment.
More than 200 police had been deployed on Thursday to close the Puerta del Sol square for the third day running.
In the evening, hundreds of demonstrators marched across the city to protest against the closure.
Monitored by police helicopters, they held a rally at the Plaza de Cibeles and many then gathered outside the interior ministry on the Paseo de la Castellana.
Witnesses said several police vans arrived and riot police charged into the crowd.
A spokesman for the emergency services told AFP news agency that 20 people were slightly injured, including seven policemen.
Four people were taken to hospital for observation, he said.
The protests in Madrid began on 15 May and spread to other Spanish cities via Facebook and Twitter.
Spain's unemployment rate is the highest in the EU, at 21.3%, and is particularly high among the under-25s, at 44.6%.