President Barack Obama said on Tuesday the United States would cooperate with Europe as it deals with Greece's debt woes and said a potential default there would be disastrous.

German Chancellor Angela Merkel, meeting with Obama on an official visit, said the euro zone shared a common interest in ensuring that the currency bloc was not endangered.

The two leaders said they discussed the debt crisis extensively. A proposal for a second Greek bailout package worth 80 billion to 100 billion euros over three years was taking shape, euro zone sources said.

Obama said Germany would be key to solving the crisis.

"I'm confident that Germany's leadership, along with other key actors in Europe, will help us arrive at a path for Greece to return to growth, for this debt to become more manageable," he said.

"But it's going to require some patience and some time. And we have pledged to cooperate fully in working through these issues, both on a bilateral basis, but also through international and financial institutions like the IMF."

Obama has cited the crisis as one in a handful of foreign "headwinds" affecting the U.S. economy.

Merkel, who is under political pressure at home to avoid being the financial savior for other struggling European countries, said Germany understood its role.

"We've seen that the stability of the euro as a whole will also be influenced if one country is in trouble," she said.

"So we do see clearly our European responsibility and we're shouldering that responsibility, together with the IMF."

Obama welcomed Merkel at a formal ceremony on the White House lawn with cannon shots and military musicians adding to the pomp and circumstance of an official visit -- the first visit by a European leader under Obama's presidency.

The show of partnership did not mask differences that the two leaders have over economic and security issues.

The United States cautiously endorsed military action in Libya while Germany confounded its NATO partners by refusing to take part.

Obama said he would expect Germany to help with Libya once Gaddafi was gone and recovery work was needed in the country, and he thanked Merkel for Germany's stepped-up support in Afghanistan, which freed up other NATO members to be active in Libya.

(Additional reporting by Steve Holland, Alister Bull, Laura MacInnis and Matt Spetalnick)