Spain moved today to shore up its credibility in global financial markets by passing a constitutional amendment to limit public debt, reassuring investors but rankling many at home.

The law, aimed at showing Europe's political will to tackle the debt crisis, drew kudos from European leaders and credit-rating agency Moody's. But it followed a bitter debate in which minority parties questioned the legitimacy of a rushed and little-negotiated reform of this magnitude and protesters sought in vain to put the issue to a referendum.

Spain's lower house of Parliament approved the measure with 316 votes in the 350-seat chamber. Next week the less powerful Senate is expected to rubber-stamp the law, which will become only the second amendment of the Spanish constitution since the end of the dictatorship of Francisco Franco in 1975 – and by far the more significant.

The controversy is not so much over the content of the reform, which in effect upgrades already existing balanced budgets laws and deficit caps to the constitutional level. But many are upset with how Spain's two largest political parties, which are normally at odds, effectively sidelined all other voices in an urgent push to respond to shaky markets.

“It was clearly urgent. Spain cannot endure market pressure like in August for a long time. And to be fair, this is the first time the two biggest parties agree on how to deal with the economic crisis,” says Josep Oliver, applied economics professor in the Universidad Autonoma de Barcelona. “But I think it was a mistake. It wasn’t handled properly. The urgency and the need to show majority support didn’t rule out reaching broader consensus. It was an unnecessary blunder.”

Responding to Germany's demand for reforms

The amendment caps Spain's public deficits starting in 2020, both for the central and regional governments, and makes it mandatory to get preapproval before issuing any public debt.

All 17 countries in the eurozone are expected to pass similar reforms by the middle of 2012. That was a precondition set by Germany, which bankrolls around a third of Europe’s bailouts, and other richer northern European countries before they committed to rescuing peripheral economies such as Greece, Portugal, and Ireland. Italy and Spain are also seen as potentially needing a bailout soon, unless the cost of issuing debt decreases.

Spain's reform doesn’t set the deficit ceiling, and it's designed to be flexible in case of economic crisis. A parallel new law to set the deficit limit will be passed by Germany's deadline of mid-2012. France and Italy have already announced plans to include balanced public finances at the constitutional level, and the other countries are expected to eventually do the same, either because they support it or because they have to access more bailout funds.

“It’s inevitable, to meet the German demand, to include in constitutions what is already part of European treaties," says Prof. Oliver, referring to government public deficit caps already in place, but not at the constitutional level. "It’s one of the demands to guarantee German support, and it’s also required to allow them to sell this to their own public opinion.”

Setting a deficit cap is seen as essential to shore up Spain’s credibility in financial markets. Interest rates on Spanish debt, along with those of other European countries, rose to record highs last month, mostly over concern about Italian finances and political instability.

Spain has been consistently meeting austerity commitments and delivering on deficit cuts, but in absence of a cohesive European response to broader regional economic turmoil and still haunted by stagnant growth and stubbornly high unemployment of nearly 22 percent, Prime Minister José Luis Rodríguez Zapatero rushed passage of a constitutional amendment to soothe markets

But Mr. Zapatero's ruling Socialist Party decided to largely bypass minority and regional parties in order to fast-track approval of the amendment before November general elections with the support the leading opposition Popular Party, which is expected to win a landslide victory then.

German Chancellor Angela Merkel personally congratulated Zapatero on Wednesday. The EU Commission, French President Nicolas Sarkozy, and the OECD also welcomed the news, and rating agency Moody’s said it is a positive step it will take into consideration in its assessment of Spain’s economy.

'Totally undemocratic' reform

But back in Spain, the result was not the political victory the government and opposition party had hoped. Two Socialist legislators joined three other minority party legislators in voting against. But the remaining legislators didn’t bother to vote in protest over being left out of talks, an embarrassing outcome when it comes to a constitutional amendment.

Legislators of minority and regional problems complained about “totally undemocratic” reform and of “exclusion, not consensus.” One suggested amending the constitution to prevent bipartisan reforms that exclude all other parties.

It’s not just the marginalized political forces that are enraged. Youth movements expressing public disenchantment with the traditional political establishment have protested outside Congress for three days and have called for more protests. The country’s biggest labor unions have also called for another march Tuesday, ahead of the final Senate passage. Both demand any constitutional amendment to be legitimized through a referendum.

But in passing the constitutional amendment, the government made it clear its priority is to increase the country’s and European credibility, which translates into budging to Germany’s conditions.

Germany already incorporated a deficit ceiling in 2009, which set the structural deficit at 0.35 percent of the gross domestic product. (Structural deficit refers to long-term inability to balance public budgets: that is, when revenues can’t cover expenses. Cyclical deficit, by contrast, varies with the economic growth, going upward in times of recession, and downward in times of surplus.)

Spain is planning to set its structural deficit cap at 0.4 percent of GDP by 2020, far from the International Monetary Fund estimates for Spain's structural deficit of 4.7 percent for 2011, 7.4 percent in 2010, and even 1.2 percent in the bonanza year of 2006.