G20 finance leaders said on Friday they had secured a better-than-expected global economic recovery but were wary of overconfidence as Greece's debt crisis put the focus on worsening public finances.

The Group of 20 rich and emerging countries failed to forge consensus on how best to recoup the cost of bailing out financial firms, whose risky bets sent the global economy into its worst tailspin since World War Two.

They also skirted over the thorny issue of whether China should allow its yuan currency to rise more rapidly to curb its export-driven growth. G20 officials said there was no discussion of specific currency exchange rates.

In a six-page communique released at the meeting's conclusion, finance ministers and central bankers said the recovery has progressed better than previously anticipated and credited their own efforts with helping to end the financial panic that gripped the global economy a year ago.

Despite that upbeat assessment, Canadian Finance Minister Jim Flaherty said the International Monetary Fund had cautioned the G20 against overconfidence.

There was some significant concern that some countries had been too optimistic in their economic projections and that cumulatively there was perhaps too much optimism, he said.

While Greece was not formally on the agenda, it was a hot topic both at the G20 and on the sidelines, where officials rallied behind aid expected to be worth up to 45 billion euros ($60.5 billion), potentially the biggest-ever bailout of a country.

Finance ministers said they would not allow debt troubles to fester and threaten the European Union or world economy.

If the house of your neighbor is on fire, even if it is a small house and, maybe, it is your neighbor's fault, you'd better not ignore the fire, Italian Economy Minister Giulio Tremonti said.

You'd better use a fire extinguisher, if you have it, and we have it. Otherwise the fire will reach your house as well, even if it is a beautiful and big house.

SOUNDS FAMILIAR

The G20 has largely supplanted the rich-only G7, an acknowledgment that the global financial crisis emanated from the rich world which now needs help from fast-growing emerging powerhouses to solve global problems.

The message from this meeting was similar to what was agreed in September, when G20 heads of state laid out broad principles on enacting regulatory reform, securing economic recovery, and rebalancing global growth.

Finance ministers will meet in Korea in early June, ahead of a leaders summit in Toronto later that month, and officials said they were hopeful for more concrete progress then.

Economists agree that efforts to pump a combined $5 trillion in stimulus money into the economy and cut interest rates to the bone have stopped the economy's free-fall.

However, the rescue left most advanced economies shouldering debt burdens approaching World War Two highs, and Greece's fiscal troubles highlighted how risky that can be.

The G20 stressed the need to elaborate on how countries will withdraw emergency spending and lending programs without jeopardizing the recovery, but acknowledged that different recovery rates meant countries needed different policies.

The sharpest division was over an IMF proposal to levy taxes on banks so that taxpayers would not foot the bill for costly bailouts. Britain and the United States have pushed for such policies, while Canada has been the most vocal opponent.

Canada's Flaherty said he thought sentiment was swinging toward his country's position.

When asked about that, U.S. Treasury Secretary Timothy Geithner showed a flash of humor: All things are swinging Canada's way. They won the medal in the Olympics -- the hockey medal, he said, referring to Canada's victory over the United States in Vancouver. That's a good sign for Canada.

(Reporting by G20 team; Writing by Emily Kaiser)