What had been a day of largely peaceful demonstration 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, who responded by firing rubber bullets and charging, an AFP reporter at the scene said.
Earlier in the day, eight columns had converged on the capital — carrying flags from Andalucia in the south, Catalonia in the east, or 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 euro ($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 under-25s — out of work.
Meanwhile, say protesters, the corrupt collusion between officials and bankers that caused the crisis has gone largely unpunished.
"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," promised Diego Canamero, spokesman of the Andalusian Workers' Union, one of 300 groups taking part.
"Either the government responds to our demands or it must pack its bags," he said.
They were joined by many civic groups that emerged out of the mass "Indignados" protests of 2011 and 2012 when the crisis first hit. The Indignados were seen as forerunners of the "Occupy" movement that spread around the world.
The organisers hired hundreds of buses and at least four trains to transport protesters , while the government deployed around 1,700 police.
"In 2014, we are facing an extremely difficult situation, a social emergency, that demands a massive collective response from all workers, citizens and the people," the organisers said in their manifesto.
By early afternoon, the columns had formed at entry points around the perimeter of Madrid. A sea of placards emerged, calling for "fair pensions" or "the right to a roof".
At the head of a column from the southeast was a mock guillotine with the words "No to spending cuts" written across the top.
Among the first to arrive at Atocha station were a small group of "Yayoflautas", retired members of the Indignados recognisable by their flourescent yellow jerseys, who had come from Cordoba in Andalucia.
"The Corrupt: We know who you are", their placard read.
The unprecedented austerity package imposed by the right-wing government of Prime Minister Mariano Rajoy after its election in late 2011 was considered vital to bringing Spain's huge debts under control and restoring confidence in its shattered banking system.
But spending cuts of €150 billion have done nothing to dent Spain's record levels of unemployment and prolonged recession, and triggered two general strikes in 2012 that brought millions to the streets.
Many are angry at paying the price for what they see as the corrupt collusion of Spanish lawmakers and regional banks that helped trigger the crisis.
"Let them give us the money stolen by politicians and bankers," said protester Trini Reina, 48, from Seville. "I haven't paid my mortgage for seven months. The system is bankrupt and we are paying dearly for it."