Fifteen people were arrested and 16 others sent to hospitals with minor injuries as a result of clashes that followed an anti-austerity protest in the Spanish capital.
Similar demonstrations took place Thursday night in more than 80 other cities across Spain.
While police estimated the turnout in Madrid at around 40,000, organizers, including Spain's two largest labor federations, said 600,000 took part in the march through the capital.
The nationwide protests came hours after Parliament endorsed the measures adopted last week by Prime Minister Mariano Rajoy's administration, which include eliminating the traditional Christmas bonus for public employees, increasing value added tax and reductions to unemployment benefits.
Spain's fourth austerity package in seven months is aimed at achieving 65 billion euros ($80 billion) in savings to meet a European Union-mandated budget deficit target, the conservative government says.
Police commanders told Efe that 15 people were arrested in Madrid for disorderly conduct and resisting authority.
Riot police charged crowds of people who set fire to trash cans on streets near Parliament.
All of the 16 people - including two cops - taken to hospitals were treated and released, a spokesperson for municipal fire rescue said.
Spain's economy has been battered in recent years by the global recession and the collapse of a massive real-estate bubble, which has left many banks saddled with toxic property assets.
Overall unemployment stands at more than 24 percent, while Spain's young people face a jobless rate of 50 percent. EFE