The leaders of Germany and France clinched a deal on a joint European-IMF financial safety net for debt-stricken Greece at a EU summit on Thursday, in an effort to restore confidence in the euro.

The accord, which a Greek government spokesman called fully acceptable after weeks of wrangling in the European Union over whether and how to help his country, was to be endorsed by leaders of the 16-nation single currency area later on Thursday.

It included no figure, but a senior European Commission source said the support package would be worth 20-22 billion euros ($27-29 billion) if required in an emergency.

However, tough terms imposed by German Chancellor Angela Merkel mean the mechanism could be activated only under strict conditions and would require the unanimous approval of the euro zone, giving Berlin a veto.

The cost of insuring Greek debt against default fell on news of the agreement, and the premium investors charge for holding Greek bonds rather than benchmark German bunds narrowed. But it remained more than double the spread charged on fellow euro zone weaklings Ireland and Portugal, and four times that of Spain.

The European Central Bank also took a key step to support Greece by extending softer rules on collateral so Athens does not risk a guillotine on its debt at the end of this year.

A French official said President Nicolas Sarkozy and Merkel agreed at a pre-summit meeting on a text ... which describes very precisely the conditions on which euro zone countries could be called upon to intervene.

Under the arrangement, euro zone countries would provide the majority of any funding for Greece, with rigorous conditions set by the European Commission and the ECB, and the International Monetary Fund would contribute money and expertise.

The mechanism would be triggered only if there were very serious difficulties and there was no other solution, the French official said.

Many details remained unclear, such as the division of responsibilities between the IMF and the euro zone in a rescue.

After saying for weeks she would not agree to any aid for Greece, Merkel signaled in parliament that she would accept a contingency plan provided the IMF was involved and EU partners agreed to toughen the bloc's budget deficit rules.

A good European is not necessarily one who offers help quickly. A good European is one that respects the European treaties and national rights so that the stability of the euro zone is not damaged, she said.

Officials said the agreement mentioned the need for sanctions against countries that repeatedly flouted the EU fiscal regulations. An EU official said it would also lead to increased budgetary surveillance of euro zone countries.

ECB LIFELINE

Some euro zone states, notably France, and ECB policymakers have previously opposed IMF involvement, arguing that such a move would underscore the single currency area's inability to solve the deepest crisis in its 11-year existence on its own.

If the IMF or some other body exercises the responsibility in lieu of the Eurogroup or instead of governments, it is evidently very, very bad, ECB President Jean-Claude Trichet told France's Public Senat television in an interview.

Greek Prime Minister George Papandreou told reporters his country would press ahead with painful austerity measures to slash a huge budget deficit, regardless of what EU leaders decided at the two-day meeting.

Greece is determined to deal with its own problems, put its own house in order, he said. We have already ... embarked on a journey of major radical reform.

Trichet earlier gave Athens some good news, announcing that the central bank would extend looser collateral rules, due to expire at the end of this year, into 2011.

Greece was at risk of having its bonds rejected as collateral for refinancing with the expiry of the relaxed rules, potentially triggering an even deeper liquidity crunch.

It is the ECB's contribution to the resolution of the Greek crisis, said Nomura economist Laurent Bilke. It is also a message to the EU that Greece deserves support.

Athens is still saddled with borrowing costs more than double those of Germany and must borrow some 16 billion euros between April 20 and May 23 alone to refinance maturing debt.

Greece says a standby aid package from the EU will reassure credit markets and avert the need for it to request aid.

In Germany, Europe's biggest economy, there is overwhelming public opposition to any bailout for Greece, fuelling fears that direct euro zone assistance would face legal challenges at home.

Merkel has an extra incentive to stick to her guns ahead of a crucial state election on May 9, where defeat would erase her center-right majority in the upper house of parliament.

The German people gave up the deutschmark based on their faith in a stable euro. This faith, and this is the view of the entire German government, cannot be disappointed under any circumstances, she said.

Without a fallback mechanism, EU leaders fear Greece's debt problems could spread to other countries in the euro zone including Portugal, Spain or Italy.

Fitch downgraded Portugal's sovereign debt rating by one notch to AA- on Wednesday. The Portuguese opposition cleared the way for parliament to approve the government's austerity budget later on Thursday by saying it would abstain.