Thousands of protesters in Madrid have rallied into the night to denounce the Spanish government’s austerity measures.

There were outbreaks of trouble although the protest was largely peaceful.

As spending cuts continue to bite, demonstrators near the parliament called on the right-wing government to resign.

Police sealed off access to the parliament building in the wake of violence in previous days.

Some had travelled from other parts of Spain to protest against pay freezes, tax rises and the eurozone’s highest unemployment rate.

They accuse politicians of raiding the welfare state to bail out badly-run banks.

It was the third such protest in five days and again there were scuffles as tempers flared.

Demonstrators clashed with riot police. Some people were lightly injured and at least two people were detained.

On Friday, Prime Minister Mariano Rajoy’s government presented a 2013 draft budget that will cut overall spending by 40 billion euros.

The new budget suggests debt levels are set to rise next year, increasing pressure on the government to apply for aid.

Spain’s finance minister Cristobal Montoro said on Saturday the cuts were necessary to ease market tensions and encourage investors.