The G8 group of major world economies has said it wants Greece to remain in the eurozone.

During its meeting at Camp David, which was dominated by the debt crisis, US President Barack Obama said the G8 nations are "absolutely committed" to the goals of growth, stability and fiscal consolidation.

Mr Obama pledged to work with Europe on a package that balances growth with debt reduction, as world leaders try to prevent the worsening eurozone crisis from destabilising the global economy.

The G8 leaders are seeking ways to soothe financial markets after worries about Spain's banking problems and the risk of a Greek exit from the eurozone sent world stocks to their lowest levels this year.

"All of us are absolutely committed to making sure that both growth and stability, and fiscal consolidation, are part of an overall package in order to achieve the kind of prosperity for our citizens we all are looking for," Mr Obama said.

After an early morning meeting with Mr Obama, British Prime Minister David Cameron said he detected a "growing sense of urgency that action needs to be taken" on the eurozone crisis.

"Contingency plans need to be put in place and the strengthening of banks, governance, firewalls - all of those things need to take place very fast," he told reporters.

European Union leaders seemed keen to stress yesterday that they would stand firm in protecting their banks, after news of escalating bad loans raised the specter that rescuing Spain's banks would crash the eurozone's fourth largest economy.

"We will do whatever is needed to guarantee the financial stability of the eurozone," EU President Herman Van Rompuy said.

Earlier, French President Francois Hollande suggested using European funds to inject capital into Spain's banks, which would mark a significant acceleration of EU rescue efforts.

Balancing a growth agenda with efforts to lower government debt through fiscal belt tightening is a crucial part of the G8 discussions.

Mr Obama has aligned himself with Italy's Prime Minister Mario Monti and the new French president in putting more emphasis on growth.

That places pressure on German Chancellor Angela Merkel, who has pushed fiscal austerity as the prime means of bringing down huge debt levels that are burdening European economies.

Voters in eurozone countries have shown frustration with that approach, ejecting the Greek government and in France the conservative Nicolas Sarkozy was defeated by Mr Hollande, a socialist, in 6 May elections.

A draft of the summit communiqu shown to Reuters will stress an "imperative to create growth and jobs."

There are also signs of softening in Germany's austerity stance as its largest industrial union IG Metall struck its biggest pay deal in 20 years early today.

The 4.3% pay increase, more than double Germany's inflation rate, will boost worker buying power in the eurozone's richest nation and lift consumption - something the US long has urged as a means to bolster overall growth throughout the world's second largest economic region.

Also on the summit agenda are concerns about oil and food prices as well as Afghanistan, Iran, Syria and North Korea.

Speculation has grown that Mr Obama will use an energy session at the G8 to seek support to tap emergency oil reserves before a EU embargo of Iranian crude takes effect in July.

However, with oil prices already sliding, a move by Mr Obama to tap the Strategic Petroleum Reserve - alone or along with other countries - could expose him to criticism that the emergency supply should only be touched in a supply crisis.

The Camp David summit kicked off four days of intensive diplomacy that will test leaders' ability to quell unease over the threat of another financial meltdown as well as plans to wind down the unpopular war in Afghanistan.

After the Camp David talks wrap up late this afternoon, Mr Obama will fly to his home town of Chicago where he will host a two-day NATO meeting at which the Afghanistan war will be the central topic.