By John O'Donnell
BRUSSELS (Reuters) - All but two European Union countries signed a treaty on tighter budget discipline for the euro zone on Friday, marking a coup for Germany which pushed for the accord to try to prevent a repeat of the loose spending that led to a debt crisis.
Only Britain and the Czech Republic did not sign the 'fiscal compact', under which countries in the euro zone are bound to write a 'golden rule' on balanced budgets into their national constitutions or equivalent laws, with automatic correction mechanisms if the rule is breached.
"This stronger self-constraint ... as regards debts and deficits is important in itself," said Herman Van Rompuy, who, as President of the European Council, played a key role in negotiating an agreement acceptable to all signatories.
"It helps prevent a repetition of the sovereign debt crisis," he said, in a speech at the signing ceremony.
But the agreement could yet pose significant difficulties.
Ireland, which depends on the euro zone for financial support after its banking system collapsed, will hold a referendum on whether it should be party to the pact - a vote the country's finance minister has compared with asking the nation whether it wants to remain inside the euro currency bloc.
Speaking to journalists after the leaders' gathering, German chancellor Angela Merkel emphasized that only countries that committed to the new regime would qualify for a bailout from the euro zone's rescue scheme, the European Stability Mechanism (ESM).
"We have the two instruments," Merkel told reporters. "On the one hand, the fiscal pact, and, on the other, the permanent European rescue mechanism. The two are interlinked."
"That means that in the future, only those that commit to fulfilling the specifications of the fiscal pact will be eligible for support from the permanent support mechanism."
Irish voters have rejected new European laws in referendums in the past.
If they were to do so again in a vote expected by June, it could ruin plans to return to borrowing on financial markets as soon as this year because the country may be seen as a higher default risk by investors without the backstop of the ESM.
This in turn would most likely mean the country needs a second financial bailout. If it does not sign the pact, however, it would not qualify for help under the ESM.
This vicious circle could have profound implications for a still fragile euro zone. Ireland is seen as the most successful of the three countries to be bailed out by the euro zone and International Monetary Fund during the sovereign debt crisis.
"We are still in a fragile situation," Merkel said.
Perhaps an even bigger uncertainty lies in France, where opposition Socialist presidential candidate Francois Hollande has vowed to renegotiate the treaty to add measures to promote growth if, as opinion polls suggest, he defeats conservative President Nicolas Sarkozy in a May runoff.
The fiscal compact will be legally binding and will enter into force following ratification by at least 12 of the 17 euro area member states.
Van Rompuy underscored the importance of EU leaders carrying their parliaments and electorates with them.
The pact will only apply to those countries whose currency is the euro, while the others will be bound by its provisions once they adopt the currency or at an earlier date, if they so choose.
"You now all have to convince your parliaments and voters that this treaty is an important step to bring the euro durably back into safe waters," he told heads of state and government. "I am most confident you will succeed."
(Reporting By John O'Donnell, editing by Mike Peacock/Catherine Evans/Ron Askew)