Protesters clashed with police in Spain's capital as the government prepares a new round of unpopular austerity measures for the 2013 budget that will be announced on Thursday.

Thousands gathered in Neptune plaza in central Madrid where they formed a human chain around parliament, surrounded by barricades, police trucks and more than 1,500 police in riot gear.

Police fired rubber bullets and beat protesters with truncheons, first as several protesters were trying to tear down barriers and later to clear the square. 

The police said at least 15 people had been arrested and at least 6 injured.

The protest, promoted over the Internet by different activist groups, was younger and more rowdy than recent marches called by labour unions.

Protesters said they were fed up with cuts to public salaries and health and education.

"My annual salary has dropped by €8000 and if it falls much further I won't be able to make ends meet," said Luis Rodriguez, 36, a firefighter who joined the protest.

He said he is considering leaving Spain to find a better quality of life.

With this year's budget deficit target looking untenable, the conservative government is now looking at such things as cuts in inflation-linked pensions, taxes on stock transactions, "green taxes" on emissions or eliminating tax breaks.

The 2013 budget is the second one conservative Prime Minister Mariano Rajoy has had to pass since he took office in December. Spain must persuade its European partners that it can cut the budget shortfall by more than €60bn by 2014.

Mr Rajoy has already passed spending cuts and tax hikes worth slightly more than that over the next two years, but half-year figures show the 2012 deficit target slipping from view as tax income forecasts will not be hit due to economic contraction.

He said earlier this month the 2013 budget would cut spending further in all areas of government apart from pensions and borrowing costs.

Spain is at the centre of the euro zone debt crisis on concerns the government cannot control its finances and those of highly indebted regions, bitten by a second recession since 2009 which has put one in four workers out of a job.