U.S. Federal Reserve Chairman Ben Bernanke and other central bankers said on Friday the worst global recession in 70 years was nearing a close but warned it would be a long, slow climb back to normal growth.

At an annual Fed retreat set against the backdrop of the Grand Teton mountains, the officials said the coming recovery would have its ups and downs, and it was too soon to withdraw trillions of dollars in government and central bank support.

After contracting sharply over the past year, economic activity appears to be leveling out, both in the United States and abroad, and the prospects for a return to growth in the near term appear good, Bernanke said.

But both Bernanke and European Central Bank President Jean-Claude Trichet said there was still much work to be done to restore the global economy to self-sustaining growth.

Trichet said he was a bit uneasy about talk of a return to normal and that policy-makers should be as active as possible.

Surprisingly strong U.S. home sales figures, released just as Bernanke was beginning his speech, added to investor optimism that recovery was in sight, sending stock markets higher while U.S. government debt prices fell.

The conference, held at a no-frills rustic lodge in a national park in the western state of Wyoming, is a big draw for the world's leading monetary policy-makers and economists. The event includes a mix of speeches and academic papers.

This year's event sounded more upbeat than a year ago, when Bernanke and his counterparts were still struggling to get ahead of rapidly deteriorating financial markets.

Weeks after the 2008 gathering, Lehman Brothers bank collapsed and the United States rescued American International Group Inc, touching off a tumultuous period of slumping economic growth in both rich and developing countries.

AVERTING DISASTER

A large chunk of Bernanke's speech was devoted to reliving those months, looking at how officials around the world responded and what lessons they had learned about how to regulate and monitor financial markets.

We must urgently address structural weaknesses in the financial system, in particular in the regulatory framework, to ensure that the enormous costs of the past two years will not be borne again, he said.

Bernanke, whose term as Fed chairman expires in January unless President Barack Obama renominates him and he wins Senate backing, also defended controversial emergency rescue efforts and tried to explain why the Fed -- the U.S. central bank -- helped AIG but not Lehman.

The bailouts have landed the Fed -- and Bernanke -- in the middle of a sometimes heated political debate over whether it had overstepped its authority and ought to be reined in.

Bernanke credited an aggressive, coordinated policy response for averting the imminent collapse of the global financial system, an outcome that seemed all too possible.

Michael Feroli, an economist with JPMorgan in New York, said Bernanke's words did not change his view about the Fed's next policy steps.

The Fed is firmly on hold and isn't prepared to break out the confetti at the first signs of growth, he said. In fact, given the issues he focused on, Bernanke's talk seemed more directed toward the political establishment than toward nudging views of financial market participants.

Bernanke later strolled through the picturesque grounds with Trichet and Bank of Japan Governor Masaaki Shirakawa, with television cameras following, though far enough away that their conversation could not be heard.

In the past couple of weeks, reports have shown some major economies, including Germany, France and Japan, generated positive growth in the second quarter, and polls show most economists think the current quarter will mark the end of the U.S. recession, which started in December 2007.

Yet Germany's Axel Weber, a member of the ECB's Governing Council, cautioned against getting too optimistic about prospects for Europe's biggest economy.

It is too early to draw the conclusion that everything is behind us, he told CNBC television.