(AP Photo/Susan Walsh/file)
Bernanke's comments, before the House Budget Committee on Wednesday, come as concerns grow at home and overseas about the United States' mounting red ink.
"Even as we take steps to address the recession and threats to financial stability, maintaining the confidence of the financial markets requires that we, as a nation, begin planning now for the restoration of fiscal balance," Bernanke said.
The White House estimates that the government will rack up an unprecedented $1.8 trillion budget deficit this year. That would be more than four times last year's all-time high.
The recession has taken a bite out of tax revenues paid by people and companies. At the same time, the government's spending has risen, paying billions to shore up banks, help the unemployed and others hurt by the downturn, the longest since World War II.
Bernanke said that such forceful government intervention to fight the worst financial crisis since the 1930s and lift the U.S. out of recession was "necessary and appropriate" even though it worsened the nation's budget deficit.
Bernanke acknowledged that Congress and the administration face "formidable near-term challenges" that must be addressed as they take steps to stabilize the financial system, reduce home foreclosures and spur banks to lend more freely. The success of these efforts will be crucial to turning the economy around.
The danger of prolonged and persistently high budget deficits is that they can cause investors to lose their appetite for U.S. debt, which would drive up interest rates. Higher interest rates could discourage spending and investment, hurting the economy.
Bernanke cautioned: "Unless we demonstrate a strong commitment to fiscal sustainability in the longer term, we will have neither financial stability nor healthy economic growth."
With the recovery likely to be subdued, inflation will remain low, Bernanke predicted. Some worry that the Fed's aggressive efforts -- including buying billions worth of government bonds -- to revive the economy could sow the seeds of inflation.
German Chancellor Angela Merkel, in rare public criticism, took a swipe at actions by the Fed and central banks in Europe to fight the global recession. She fears that the moves could lead to problems in the future.
"I respectfully disagree with her views," Bernanke said, adding that he is "comfortable" with the Fed's actions.
Bernanke didn't offer specific recommendations on what steps they should take to bring the deficits under control.
Just days earlier, Treasury Secretary Timothy Geithner assured leaders of China -- the single-biggest holder of U.S. debt -- that President Barack Obama was committed to tackling soaring budget deficits. In March, China's Premier Wen Jiabao roiled financial markets when he expressed concern about the safety of China's holding of U.S. government debt.
Observing the recent rise in rates on mortgages and longer-term Treasury securities, Bernanke said the increases appear to reflect concerns about large federal deficits as well as greater optimism about the economic outlook. That's a reversal in a pattern seen in the depths of the recession of investors flocking to safe havens.
Bernanke cited improvements in credit markets, but again warned that a relapse could hurt the economy's recovery prospects. He also said that banks are meeting with some success in raising capital in private markets, suggesting greater investor confidence in the banking system.
Polling data suggest Americans are increasingly worried about mounting deficit and debt.
An AP-GfK poll in April gave Obama relatively poor grades on the deficit, with just 49 percent of respondents approving of the president's handling of the issue and 41 percent disapproving. By contrast, Obama's overall approval rating was 64 percent, with just 30 percent disapproving.
"We cannot add infinitely to the national debt without facing the consequences in global credit markets, or on our future capacity to borrow," said the committee's chairman John Spratt.
Bernanke said getting the budget deficits under control is especially important given the huge wave of baby boomers hitting retirement that will be tapping Social Security and Medicare.
The financial health of those two programs already are fading faster under the weight of the recession. They are headed for insolvency years sooner than previously expected, the government warned last month.
Unless changes in Social Security are enacted, the retirement fund will be depleted in 2037, four years sooner than projected last year. The Medicare trust fund is in even worse shape. It is projected to become insolvent in 2017, two years earlier than expected.
The U.S. has lost a net total of 5.7 million jobs since the recession began, meaning fewer payroll taxes are flowing into the funds.
Bernanke repeated his belief that the recession will end this year, and that the economy will start growing again later this year. But he again warned that the pace of the recovery will be slow and that unemployment -- now at a quarter-century peak of 8.9 percent -- will rise even after the recession ends.
Merkel expressed concerns central banks may have gone too far in trying to fight the global financial crisis.
"I view with great skepticism the powers that the Fed has, for example, and how, in the European area, the Bank of England has developed its own little lines," she said. The ECB "also bowed somewhat to international pressure" with its decision to buy bonds, she added.
"We must together return to an independent central bank policy and to a policy of good sense," Merkel said. "Otherwise, in 10 years we will again be standing at exactly this point."