In his testimony, he was especially pessimistic about any easing of energy prices, dismissing suggestions that they were being driven by speculation in futures markets. Instead, he said high energy costs reflected the markets’ recognition that demand was outstripping supplies.

“Over the past several years, the world economy has expanded at its fastest pace in decades, leading to substantial increases in the demand for oil,” Mr. Bernanke said. “On the supply side, despite sharp increases in prices, the production of oil has risen only slightly in the past few years.”

President Bush’s remarks, and Mr. Bernanke’s testimony, came at an unusually turbulent time in financial markets, since it followed on the heels of the Fed’s announcement that it would temporarily open its discount window to the two troubled mortgage giants, Fannie Mae and Freddie Mac.

The actions to stabilize Fannie and Freddie occurred over the weekend as the Treasury secretary, Henry M. Paulson Jr., also called for Congress to approve emergency legislation giving the federal government power to inject billions of federal funds through investments and loans.

The actions announced Sunday echoed similar actions in mid-March, when the Fed moved to avert a financial collapse of the investment bank Bear Stearns by offering an emergency loan to facilitate its sale to JPMorgan Chase. At the same time, the Fed set up emergency lending facilities for major investment banks hit by the credit crunch.

“These steps to address liquidity pressures coupled with monetary easing seem to have been helpful in mitigating some market strains,” Mr. Bernanke said. But despite the “positive effects” of the Fed’s actions, he said that the problems of unstable markets continued because of “declining house prices, a softening labor market and rising prices of oil, food and some other commodities.”

After Mr. Bernanke’s testimony, Mr. Paulson and the chairman of the Securities and Exchange Commission, Christopher Cox, took center stage.