Spain's lower house lawmakers voted overwhelmingly on Friday to put a budget deficit cap in the constitution after a stormy debate, cheering markets but infuriating many at home.
Lawmakers voted by 316 to five in favour of the constitutional reform, easily reaching the three-fifths support required.
About 10 lawmakers from smaller parties walked out in protest before the vote, which approved only the second change to the 1978 constitution since it was drawn up three years after General Francisco Franco's death.
To become law the reform must still be cleared by the Senate, which is expected to consider it next week.
The reform push is a sign of Spain's determination to prove to markets it will repay holders of its bonds and to shed its reputation as one of the usual suspects in the eurozone sovereign debt crisis.
Under the constitutional change, Spain must stick to a long-term deficit cap except in times of natural disaster, recession, or extraordinary emergencies and even then only with approval of the lower house.
An accompanying law to be enacted by June 30 next year would set the actual figure for the structural deficit -- 0.4 percent of annual gross domestic product from 2020.
The governing Socialist party and conserative opposition Popular Party put aside their rivalry to draw up the proposed reform last week even as they battled in the run-up to November 20 elections.
Even as investors and major European powers welcome the planned reform, many in Spain are furious at the change and demand the right to a referendum before it goes ahead.
Unions, some civil groups and many smaller parties say it is a hasty change to please markets that ties the hands of the government and squashes the rights of the powerful regions.
"Who do you think you are?" Rosa Diez, founder of the small Union, Democracy and Progress Party, angrily asked lawmakers of the big ruling and opposition parties.
The Socialist and Popular Party groups had "expropriated the constitution," she charged."
Several thousand demonstrators from Spain's "indignant" social protest movement took to the streets of Madrid on the eve of the vote and scores rallied nearby the parliament as lawmakers arrived.
Spain's biggest unions have called for a major protest in Madrid September 6.
The lower house rejected 18 proposed amendents to the reform before the overall vote.
If the law is approved by the Senate next week, as expected, there will be a 15-day waiting period during which lawmakers can force a referendum if they can muster 10 percent support from either house of parliament.
Germany and France had called August 16 on all 17 eurozone countries to adopt a "golden rule" on keeping the books balanced.
Spain, which already has a similar law on the books but not in the constitution, was the first nation to respond.
German Chancellor Angela Merkel congratulated Spanish Prime Minister Jose Luis Rodriguez Zapatero on the swift action when they met in a Paris summit to discuss Libya on Thursday.
Investors fear Spain's big budget deficits and feeble economy -- with a jobless rate of more than 20 percent and annual economic growth of 0.7 percent in the second quarter -- will make it harder to pay off its debts.
Latest figures Friday showed Spain's unemployment queue lengthened by 1.25 percent to 4.13 million people in August, snapping a four-month streak of job gains, as summer openings dried up.
Spain is seeking to slash the public deficit to 6.0 percent of gross domestic product by the end of 2011 from 9.2 percent in 2010. It aims to reach the EU-agreed ceiling of 3.0 percent by 2013.