What had been a day of largely peaceful demonstrations at the end of the month-long "march for dignity" – for which some participants had trekked from far-flung regions of Spain – took a violent turn in the late evening, as dozens of youths smashed the windows of a bank, set bins on fire and threw projectiles at police. Police responded by firing rubber bullets and charging to disperse the protesters.
Seventeen people were arrested and emergency services said 30 police and 41 protesters were wounded.
Earlier in the day, eight columns had converged on the capital – carrying flags from Andalucia in the south, Catalonia in the east and the Asturias in the northwest – at the culmination of nearly a month of walking for some of the protesters.
"Rise! Rise! We will fight!" chanted one group, gathered at Atocha station, before heading down the broad avenues of Madrid's city centre.
The "march for dignity" comes after two years of bruising austerity measures, forced on Spain as part of a €40 billion ($55 billion) international bailout after a huge housing bubble almost destroyed its banking system.
Austerity has left Spain in a prolonged economic funk, with more than 26 percent of the population – and half of those under 25 – out of work.
Meanwhile, protesters say, the corrupt collusion between officials and bankers that caused the crisis has gone largely unpunished.
'March for dignity'
"No to unemployment, no to exile, no to insecurity. March, march, march for dignity," the crowds chanted.
"We want work. We can't accept that millions of unemployed people must go home to live with their parents," said Jorge Balbas, an unemployed man of 24 from Burgos in northern Spain.
"It will be a tide of citizens that will restore the dignity of the capital," vowed Diego Canamero, a spokesman for the Andalusian Workers' Union, one of 300 groups taking part in the demonstrations.
"Either the government responds to our demands or it must pack its bags," he said.