Updated

MADRID -- Spanish Prime Minister Jose Luis Rodriguez Zapatero on Friday announced early general elections in November, scheduling the race four months earlier than anticipated to give his Socialist Party a better chance to stay in power amid growing outrage over the nation's economic woes.

Zapatero set the election date for Nov. 20 even though he was not required to call elections until March and had resisted repeated calls by the conservative opposition for early polling.

The miserable state of the economy is the single largest concern in Spain -- hours before Zapatero's announcement, ratings agency Moody's warned it could soon downgrade the country's credit rating. Investors are asking for higher rates to lend money to Spain, raising fears that it could be next in Europe to require a rescue package.

Analysts said early elections could help the Socialist Party candidate, Alfredo Perez Rubalcaba, Zapatero's former Interior Minister. While the Socialists have trailed Popular Party candidate Mariano Rajoy, a poll released Wednesday suggested they are closing the gap.

Zapatero made no mention of Rubalcaba, but said he believed it was best for Spain to have a new administration presiding over the troubled economy for all of next year instead of part of it.

He announced earlier this year he would not seek a third term.

"I want a new government to take control of the economy from January 1 next year," said Zapatero. "It is convenient to hold elections this fall so a new government can take charge of the economy in 2012, fresh from the balloting."

The Socialists hold a minority in Parliament, but have just barely managed to rule through alliances with a handful of small parties.

Rajoy claimed the announcement as a victory for himself, after insisting Spaniards are fed up with the handling of the economy by Zapatero and his administration and deserve early elections.

"Early elections are what the majority of the electorate wanted, so this is good news," Rajoy said.
Spain's unemployment rate is 20.9 percent, the highest in the eurozone, and anti-austerity protests have mushroomed around the country. Rajoy's party trounced the Socialists in nationwide regional and municipal elections held in May.

New polls showed that early elections are "the least bad" moment for Zapatero's party to try to retain control, said Ramon Cotarelo, a political science professor at Spain's Open University.

Adding to Spain's economic woes, Moody's warned Friday it may downgrade Spain's credit rating because of the country's weak economic growth prospects and high debt.

The move was a further sign that last week's bailout of Greece has not ended fears of debt crisis contagion elsewhere in Europe. Spain has the eurozone's fourth largest economy, and many economists say Europe can't afford to bail out the country.

Zapatero has presided over a series of unpopular austerity measures aimed at preventing the need for a bailout. They include raising the retirement age to 67, tax hikes, wage cuts for government workers like teachers and police and mergers of troubled banks holding billions of euros in unpaid mortgages.

Moody's said funding pressures on Spain are likely to increase following last week's bailout package for Greece, which has set the "precedent" of asking the private sector to take some losses on their investments in government bonds. Banks are being asked to rollover and swap their Greek debt holdings in an effort to relieve the burden on the country.

Moody's said Greece's second bailout package "has signaled a clear shift in risk for bondholders of countries with high debt burdens or large budget deficits."

Spain is struggling with the aftermath of a collapsed real-estate boom, and experts are predicting years of sluggish growth ahead. Though its debt burden is not as high as Greece's, it has a fairly sizable budget deficit, which requires funding in the bond markets on a constant basis.

The cost of borrowing for that funding has increased sharply in recent weeks, and continued to rise after last week's Greek deal, which was also aimed at easing pressure on the larger economies of Spain and Italy.