Federal Reserve Chairman Ben Bernanke said on Wednesday that he had an exit strategy from the U.S. central bank's recent massive monetary expansion that will keep inflation under control as the economy recovers.

We are quite confident that we can raise interest rates, reduce the money supply and do that all in a timely way to avoid any inflationary consequences, Bernanke told the House of Representatives Financial Services Committee as he delivered a second day of testimony on the Fed's monetary policy report.

A severe U.S. recession has brought price pressures sharply to heel and the Fed chief said that inflation would not be a problem for the next couple of years because of the considerable economic slack created by the steep slowdown.

The Fed has cut benchmark overnight interest rates almost to zero and has pumped over $1 trillion into credit markets to keep them functioning after the collapse of the U.S. housing market sparked a global credit crisis last year.

Bernanke defended the Fed's aggressive actions, and said steps taken by the U.S. central bank and others last fall averted what could have been a global financial meltdown.

I do quite seriously believe we avoided in mid-October ... a collapse of the global financial system which would have led us into a truly deep and very protracted economic crisis, he said.

The Fed chairman acknowledged that at some point economic growth would begin to take up the economy's slack, and said that would mean reversing policy to prevent the enormous increase in the U.S. money supply from creating inflation.

It is very important for us, once the economy begins to recover -- as usual, the Fed would have to begin to tighten policy -- it is very important for us to begin then to unwind our monetary expansion, he told lawmakers.

Critics worry it will be very hard for the Fed to abandon major programs to prop up the market for mortgages and consumer loans, which have ballooned the size of its balance sheet to almost $2 trillion, and that a troubling inflation will be the eventual result.

Bernanke acknowledged the risks, but said that many of the emergency measures taken by the Fed to boost credit markets would expire with time, and stressed that there was more than one way to tighten monetary policy to curb inflation.

We also have other tools, such as our ability to pay interest on reserves, which will help us raise interest rates, even if we don't get the amount of money outstanding back down as quickly as we otherwise would like.

As he had on Tuesday, Bernanke said he did not see a need for the United States to nationalize banks.

His comments on Tuesday fueled a surge in U.S. stock prices. Stocks dropped back on Wednesday, although a remark from Bernanke that U.S. officials do not plan anything like nationalization for Citigroup, which sources have said is in talks with the government on its capital needs, helped stocks cut losses.

(Editing by James Dalgleish)