Tens of thousands have been camping out in Madrid and dozens of other Spanish cities to protest over cuts and lack of jobs

Police and tens of thousands of young protesters camped out in dozens of Spanish cities are heading for a clash after the country's electoral authorities effectively ordered the government to dissolve the protests.

The committee declared that the protests contravened Spain's election laws, which ban campaigning the day before a vote. Municipal and regional government elections are to be held on Sunday amid a climate of growing anger over government austerity, spending cuts and 21% unemployment.

"They [the protests] are against electoral legislation ... and cannot happen," the committee ruled.

More than 10,000 people gathered in support of the protesters camped out at a makeshift tent city in Madrid's central Puerta del Sol square in the early hours of Friday morning, greeting with boos and whistles the decision that they must leave.

The peaceful protesters, who called another of their four or five hour open assemblies on Friday to debate the issue, looked unlikely to shift after thousands settled down to spend a fifth night in the Puerta del Sol.

"On Saturday 21 May we will continue with the exercise of collective reflection between all those attending the spontaneous meetings to have emerged in recent days," a statement from the Madrid protesters said on Friday morning.

"This is the most people we have had so far," said Jero, one of the spokesmen who have become part of the increasingly sophisticated infrastructure of an otherwise chaotic protest movement with disparate demands and united only by mistrust of the country's political elites.

Similar protests were being held in Barcelona's Plaza de Catalunya and 60 cities across the country.

As rightwing commentators accused the prime minister, José Luis Rodríguez Zapatero's socialist government of allowing "extremists" to take over the streets, the government this week faced a serious dilemma.

It had previously indicated that, having moved protesters out of the Puerta del Sol earlier this week, it was unlikely to act against them again. But that was before the electoral commission banned the protests. "We have to listen and be sensitive, because there are reasons why they are expressing their unhappiness and their criticism," Zapatero said on Thursday.