Federal Reserve Chairman Ben Bernanke defended the U.S. central bank's action to provide funding to Bear Stearns, saying Bear's failure would have led to "a chaotic unwinding" in financial markets that would have impacted the real economy.

Testifying before the Senate Banking Committee, Bernanke said Thursday a default by Bear Stearns "could have been severe and extremely difficult to contain."

"Moreover, the adverse impact of a default would not have been confined to the financial system but would have been felt broadly in the real economy through its effects on asset values and credit availability," he said.

The Fed's motives were to improve the functioning of financial markets and limit the effects of financial turmoil, Bernanke said, saying the U.S. economy is going through "a very difficult period" at present.

"Normally, the market sorts out which companies survive and which fail, and that is how it should be," he said. "However, the issues raised here extended well beyond the fate of one company. Our financial system is extremely complex and interconnected, and Bear Stearns participated extensively in a range of critical markets."

Bernanke said financial markets have recently improved somewhat but remain under "considerable stress." Key securitization markets continue to function "poorly, if at all," he said. The near-term economic outlook has weakened compared to projections released at the end of January by the Federal Open Market Committee.

Monetary and fiscal policies are working to support a return to growth in the second half of 2008, Bernanke said, adding that he remains confident in the economy's long-term prospects.

The Fed chairman also said the FOMC continues to monitor inflation, but that prices should moderate in coming quarters.

By Patrick McGee, edited by Steve Campbell and Stephen Huebl