IT IS bad enough that Americans are on the hook for $700 billion to bail out their country's mortgages and banks. But the financial crisis is about to visit even more serious fiscal harm on the economy by shrinking one of the Treasury's plumpest sources of tax revenue.

Between 2004 and 2007, the budget deficit narrowed from $413 billion to $162 billion in large part thanks to rapid growth in tax revenue. This was caused not just by rising incomes, but also by a shift in the distribution of incomes to the wealthy, who pay the highest tax rates. Much of that wealth came from the credit boom which drove up financial profits, salaries and bonuses as well as property and stock values and related capital gains.

But that means the financial bust is almost certain to crush the government's tax take. It has already started: the budget deficit for fiscal 2008 (which ended on September 30th) was $455 billion, or 3.2% of GDP, much more than the $389 billion projected in July. Much of the shortfall appears due to lower taxes on profits and the wealthy.

In early September, just before Lehman Brothers' bankruptcy plunged the world into financial turmoil, the non-partisan Congressional Budget Office reckoned the deficit for fiscal 2009 would be around $438 billion. But Peter Orszag, the agency's director, now thinks it will be at least $750 billion, due both to the recession's impact on revenue and spending (such as for unemployment insurance) and costs associated with various government bail-outs. At 5% of GDP, that would be the highest level since 1986.

In fact, though, the deficit will probably be far larger. J.D. Foster, an economist at the Heritage Foundation, notes that earlier this decade, when he worked in the White House budget office, the dotcom crash led to a loss of revenue equal to 2% of GDP beyond what a weaker economy alone would account for: it resulted from lower capital gains, stock options proceeds, bonuses and other sorts of income that are highly correlated to financial markets. That would equate to about $300 billion in today's economy. Mr Foster thinks the hit this time around will be even bigger because the recession is likely to be deeper than 2001's mild episode and the pain on Wall Street greater.

Then there's the prospect of additional fiscal stimulus, which won support on October 20th from Ben Bernanke, the Federal Reserve chairman. The Democrats in Congress, who already have a $61 billion package in the works, are now suggesting $150 billion. Barack Obama has proposed up to $190 billion over two years, and would merge that proposal with Congress's one should he become president. Republicans and John McCain have countered with separate grab bags of tax cuts, though continued Democratic control of Congress dooms such plans in their current form.

The $700 billion Troubled Asset Relief Programme (TARP) will also add to the deficit, though less than might appear. Mortgages or bank equity earn income and can later be sold; they are not a drain on the Treasury like a tank or a dole cheque. So when the Treasury purchases debt, it will only book a cost to the extent that it pays above the market price. Oddly, though, when it purchases equity in a bank it will book the full cost in that year's budget. Since it plans to invest $250 billion in bank equity, the addition to the deficit this year will be at least that much.

This all threatens to add up to a deficit of at least $1 trillion, or nearly 7% of GDP, this fiscal year, a figure that is likely to force the next president to postpone some of his more ambitious proposals. Still, even fiscal hawks concede a higher short-term deficit is a tolerable price for avoiding a potential depression—though a 7% deficit is probably testing their tolerance. And at present the American government can borrow at absurdly low interest rates: 1% for three months or about 4% for 30 years.

Yet it cannot take its lenders for granted. This year, the Treasury may have to raise more than $1.4 trillion in debt, according to Morgan Stanley, to finance not just the deficit but the TARP and the Federal Deposit Insurance Corporation. “It's going to be painful to be faced with humungous auction after humungous auction especially when competing against Europe,” which is funding its own bail-outs, says one Wall Street analyst. The Treasury got a warning of this earlier this month, when yields on its bonds briefly spiked.

America has long borrowed without fear of a backlash, thanks to lenders' lack of attractive alternatives. And it may for a while yet: much of the private sector either can't borrow or doesn't want to, and other countries also face yawning deficits, making them far from attractive. The national debt, at 38% of GDP, is well below its 1990s peak of 49%. But much of the deficit is still financed by foreigners, and global capital flows are now being rocked by the financial crisis. The next president will no doubt find deficits at 7% or more of GDP sobering enough. Without a plan for cutting that high figure back once the financial crisis and the recession pass—and with the inexorable climb in Medicare and Social Security costs as the baby-boomers retire now under way—investors may need to be compensated much more than they are now to keep on buying America's debt.