* Ruling Socialists face heavy defeat
* Protests unlikely to change results of Sunday's elections
By Inmaculada Sanz and Carlos Ruano
MADRID, May 21 Tens of thousands of people filled Madrid's Puerta del Sol on Saturday evening to protest high unemployment and austerity measures, defying a ban on demonstrations on the eve of local elections.
Protesters of all ages including families with small children and pensioners joined hundreds of young Spaniards, who have been camping out in Madrid for a week, in peaceful protest against the government's handling of the economic crisis.
The number of demonstrators, dubbed "los indignados" (the indignant), swelled to around 30,000 people on Saturday night, cramming into Madrid's main square and surrounding streets.
"I'm protesting because I've got no job future in Spain even though I've finished my degree in tourism," said 25-year-old Inma Moreno in Madrid. "This should make the political classes aware that something is not right."
Protesters also gathered in Barcelona, Valencia, Seville, Bilbao and other cities urging people not to vote for either of Spain's two main parties, the ruling Socialists or the centre-right opposition Popular Party.
The Socialists are expected to suffer major losses in the elections for 8,116 city councils and 13 of 17 regional governments.
Prime Minister Jose Luis Rodriguez Zapatero, who has failed to contain the highest unemployment in the European Union at 21.3 percent, has said he understands the protesters.
Until now, Spaniards have been patient with austerity measures and a youth unemployment rate of 45 percent, but the protests show the frustration over the prolonged economic malaise.
"I'm happy that they're finally protesting. It was about time," said Maria, an elderly woman with a cane, sitting next to a sleeping, dreadlocked young man on a sofa that had been moved into the Puerta del Sol plaza.
The woman, who declined to give her family name, said she was at the protest on Saturday to visit her grandson.
"We knew something like this would eventually happen. Spain's politics has not been very convincing and with all the effects of the crisis. Something had to happen," said sociologist Fermin Bouza of the Complutense University.
Fearing violent clashes, the government has not yet sent in police to enforce the ban, which went into effect at midnight and prohibits political events on the eve of the election.
Many protestors called on people to respond to any violent outbursts by forming a circle around the perpetrators and sitting on the ground with arms interlocked.
Each evening when the numbers of demonstrators swell, immigrants move through the crowd selling beers out of backpacks -- raising the possibility that alcohol could sour the so far peaceful mood of the crowd.
"It's a revolution, not a drinking party," said signs, trying to discourage protesters from turning the demonstrations into a gigantic "botellon", the Spanish word for gatherings of young people in city parks in the summer to drink.
Movement organisers were making efforts to keep the square clean on Saturday, using brooms donated by supporters.
Spain pulled out of recession at the start of last year but the economy has failed to gain serious momentum and unemployment has spiralled ever higher.
The government's borrowing costs have risen as investors see a risk that slow growth will make it impossible for Spain to cut its deficit, possibly setting it up for a financial crisis and rescue such as in Greece, Ireland and Portugal.
On Friday, the risk premium on Spanish government bonds jumped to its highest level since January due to concerns over Greece's need for a bigger bailout and that the election result in Spain would make it tough for the Socialists to implement further austerity measures.
Despite attracting huge media attention, analysts said the protests would not change the outcome of Sunday's elections, other than to deepen the Socialist rout by motivating some people to vote for small leftist parties.
"It'll have a very marginal effect, unless there's some kind of violent outbreak over the weekend, which I doubt," said Fernando Fernandez, an analyst with IE Business School. (Additional reporting by Paul Day; Writing by Fiona Ortiz, Editing by Alison Williams)
Our top photos from the last 24 hours.