Spain reached political consensus on Friday to set constitutional limits on its public deficit and debt, though details were sketchy and there were few signs the accord would persuade markets Madrid can manage its finances.

The constitutional amendment agreed by the country's main parties will come into effect in 2020 and will not include specific deficit cap figures, the ruling Socialist party said in a statement early on Friday.

It must be approved before June 30, 2012, and will be accompanied by an ancillary law which will set a ceiling for the structural deficit -- the fiscal gap over the course of a normal economic cycle -- at 0.4 percent of gross domestic product (GDP).

Economy Minister Elena Salgado earlier this week defined normal growth as between 2-3 percent of GDP.

Madrid's deficit is at the heart of concerns it could eventually need a bailout like Greece, and news of the amendment follows calls by Germany and France for Spain and other states at the sharp end of the euro zone debt crisis to set binding limits on their deficits to regain the trust of investors.

The euro rose on Friday's announcement but Spanish debt prices were little changed, and one analyst said the news did little to change the market's view that Spain will struggle to keep a lid on its debts.

In our opinion, the agreement according to the terms they've laid out doesn't really offer credibility ... on the commitment to containing the deficit, Spanish bank Banesto said in a note.

Not so much because of the lack of a concrete numbers, but because they leave the door open to too many exceptions ... as well as the possibility of changes in the future.

In order to give the economy greater flexibility during times of crisis, parties to the agreement can revise the deficit caps in 2015 and 2018, Friday's announcement said.

IT'S ALL ABOUT THE DEFICIT

Spain has slashed its headline public sector deficit, one of the highest in the euro zone, to an expected level of around 6 percent of GDP at the end of this year from 11.1 percent in 2009.

It has also pledged to bring the shortfall down to 3 percent of GDP by end-2013, in line with European Union guidelines, but market worries have still pushed the country's debt yields to euro-era highs.

The constitutional amendment is only the second since Spain's basic law was drawn up after the end of Francisco Franco's dictatorship in 1978.

The framework for the ancillary law says the central government's structural deficit should not exceed 0.26 percent of GDP, while the structural deficit of each regional government should not be over 0.14 percent. Local governments must present a balanced budget.

The ancillary law will also establish criteria for the progressive reduction in the level of the country's debt in line with the euro zone's growth and stability pact, the government said.

Constitutional rules, if they're well designed and have sufficient reach, are useful to improve economic governance. But they are useless if they don't resolve structural problems in the economy, Madrid-based think tank Fedea said in statement.

There must be a reorientation of reforms of our labor market, financial system and education, it added.

The government is expected to announce a new range of labor market measures later on Friday following last year's sector reform which aimed to increase the flexibility of a system that has left one in five Spaniards out of work.

Prime Minister Jose Luis Rodriguez Zapatero, who will not be renewing his mandate as leader of the Socialists in November's general election, said he wanted to set the constitutional debt cap before he left office.

Other economists applauded the call to include some level of budgetary prudence in the constitution, saying that the fact the amendment covered all levels of government it would help reassure markets.

This proposal comes as a (positive) surprise as it was expected that an expenditure-ceiling rule would be voted by each of the regional parliaments in September, but there is no guarantee that every regional parliament would support it, Barclays Capital said.

However, the proposed constitutional amendment would automatically apply to all levels of the government, including the regions.

(Additional reporting by Paul Day; Editing by Alison Williams, John Stonestreet)