WASHINGTON  The Federal Reserve Chairman, Ben S. Bernanke, told lawmakers on Tuesday that the country faces “a prolonged episode of economic stagnation” if they do not address the economic crisis forcefully, but he quickly encountered deep anger, particularly over the dealings of the ailing American International Group.

Mr. Bernanke told the Senate Budget Committee that the worst outlook, should action on the crisis prove inadequate, would be “further deterioration in the fiscal situation” and probably “lower output, employment and incomes for an extended period.”

But the chairman was met at once with sharp questions from the senators, some of whom said they were passing on the resentment they have been hearing from constituents, not necessarily about President Obama’s proposed $3.55 trillion budget for the next fiscal year but about the rescue plan for the financial system and the stimulus package.

“Mr. Chairman,” Senator Ron Wyden, Democrat of Oregon, asked at the outset, “at what point will the taxpayer no longer be on the hook for the massive A.I.G. failure? What is the end game for American taxpayers?”