Thousands of people took part in a “march for dignity” in Madrid on Saturday to protest against austerity measures on the eve of a closely-watched regional election in southern Spain.

Sunday’s vote in Andalusia, one of the poorest parts of the country, is seen as a test of the national mood ahead of Spain’s most unpredictable general election in decades.

“Bread, work, a roof and dignity” read a large banner as a group of demonstrators made their way through one of the richer areas of the capital before joining up with other protesters at the Plaza de Colón square.

The demonstrators were voicing their discontent with the painful austerity policies that have led the government to make spending cuts to the tune of €150bn ($162bn) between 2012 and 2014. Education, public health, and social benefits have all been affected.

Spain saw growth of 1.4% in 2014 but after an economic crisis that lasted six years, the economy remains battered with an unemployment rate of 23.7%.

Half of all young people between the ages of 16 and 25 are without jobs.

“We have mobilised here for the young people because in Extremadura youth unemployment is almost 60%,” said 28-year-old Antonio Laso who hails from the country’s southwestern region.

“It is a day to claim our rights,” said Antonio Colmenar, an activist with an anti-eviction organisation who said he had travelled from the Andalusian capital Seville to march in the rally.

The 41-year-old had yet to decide whether he will on Sunday vote for the left-wing anti-austerity Podemos party or for Ciudadanos, a centre-right party which also rails against corruption and unemployment.

These two upstarts are challenging the two-party system that has dominated Spanish politics for more than 30 years, with Podemos topping the latest opinion polls after riding a wave of popularity following the January election win of Greece’s hard-left Syriza party.

Last year’s inaugural “march for dignity” in Madrid descended into violence with dozens of protesters and police officers injured in clashes.

Saturday’s rally passed off peacefully although police said they had arrested 17 people for vandalism and public disorder.