The deal opens the way for bilateral loans within an EU framework combined with loans from the International Monetary Fund (IMF).

'Last resort'

Al Jazeera's Alan Fisher, reporting from Brussels, said the deal does not mean Greece will get immediate cash from the EU.

in depth
  Blog: The last resort
  Blog: Mayhem in Athens
  Greek PM meets Obama over crisis
  Support for European economic fund
  Greece urged to sell islands
  Inside Story: Greece's financial turmoil
  Counting the Cost: Greece's debt problems
  Video: Wake-up call for Greek economy

"It wants to go to the markets to see if it can refinance its debt. But the problem it had was that the markets were demanding a very high interest rate.

"The markets could, because Greece had no Plan B. Now it does, but as Angela Merkel (the German chancellor) keeps reminding everyone, this is only to be used as a last resort."

There had been hesitation from France and Germany over the deal, but the two nations agreed to back the plan earlier on Thursday.

Earlier, Spain, which holds the rotating presidency of the EU, had said a "European solution" was needed to help Greece, which needs to borrow around $21.4bn between April 20 and May 23 to refinance maturing debt.

Athens had said it only needed a standby aid package to reassure nervous financial markets and that it can get by without having to resort to using the money being raised under the deal.

Public opposition

A German official earlier said eurozone states would have to agree to activate the plan, giving Berlin a veto.

Germany, Europe's biggest economy, now faces public opposition to the deal ahead of a regional election in May and any financial assistance may face a legal challenge at home.

Greece has already taken a string of austerity measures, prompting widespread and largescale domestic strikes and protests.

Athens most recent plans saw an additional $6.5bn in savings through public sector salary cuts, pension freezes and consumer tax hikes to deal with its ballooning deficit.

The latest cutbacks, added to a previous $15.24bn of austerity measures, seek to reduce the country's budget deficit from 12.7 per cent of annual output to 8.7 per cent this year.

The long-term target is to bring overspending below the EU ceiling of 3 per cent of GDP in 2012.

EU leaders are concerned debt-servicing problems could also hit other countries in the eurozone including Portugal,Spain and Italy.

Wrangling over the Greek issue has also threatened cohesion across the eurozone and driven down the value of the euro currency, used by 16 member states including Greece.

World stock markets rallied on news of the negotiations.