The federal budget deficit will shrink this year to $331 billion from the record $412 billion last year, largely because of surging tax payments in a strong economy, the Congressional Budget Office forecast yesterday.

The CBO deficit estimate for the 2005 fiscal year, which ends Sept. 30, is slightly below the Bush administration's forecast of $333 billion, released last month. In both cases, the figures show the budget gap narrowing more quickly than expected just a few months ago because of a faster-than-anticipated rise in individual and corporate tax revenue.

But CBO Director Douglas J. Holtz-Eakin said yesterday that much of the increase in tax revenue is likely to prove temporary.

The federal budget outlook "has improved noticeably for this year" compared with the CBO's March forecast of a $365 billion deficit, Holtz-Eakin told reporters at a news conference. But, he added, the picture is largely unchanged for the decade after.

At $331 billion, this year's deficit would be the third-largest on record. But it would mark the first decline after three years of swelling. And the CBO forecasts the deficit to keep receding, to $314 billion in fiscal 2006, which starts Oct. 1.

President Bush inherited a $128 billion budget surplus when he took office in 2001, but the black ink turned red in following years as tax revenue fell because of the bursting of the stock market bubble, the recession, continued job losses and tax cuts, while federal spending rose to cover the wars in Afghanistan and Iraq and other expenses.

Republicans on Capitol Hill viewed the CBO forecast as a vindication of the president's tax-cut policies, which they want to make permanent.

"We're clearly on the right track," said House Budget Committee Chairman Jim Nussle (R-Iowa). "The strong economy, higher revenues and falling deficit projections are all results of the successful leadership and policies of the Congress and the president."

But congressional Democrats, who want to let the tax cuts expire as scheduled by the end of 2010, warned that the short-term deficit improvement should not distract attention from the looming, long-term budget problem of covering rising Social Security and Medicare costs as the baby boomers retire in coming years.

"We need to change fiscal course," said Sen. Kent Conrad (D-N.D.), the ranking minority member on the Senate Budget Committee. "Continuing to cut taxes and increase spending only accelerates our buildup of debt."

The CBO's $331 billion deficit forecast relies on spending $173 billion in surplus Social Security tax revenue on other government programs, with the money to be repaid to Social Security some time in the future. Without the Social Security surplus, the deficit would be $504 billion this year.

The improvement in the budget picture since March resulted largely from an $85 billion increase in projected revenue, two-thirds of which came from higher-than-expected corporate tax revenue, the CBO said. The agency in March had forecast corporate receipts to grow 14 percent this year compared with last year; now they are projected to soar 42 percent.

Holtz-Eakin said the possible explanations include a much more robust profit growth than has been apparent in other government data. Corporate tax compliance may have increased. The surge could reflect a one-time corporate tax holiday enacted last year.

Whatever the source, Holtz-Eakin said, "we really don't know" whether the increase in corporate tax receipts will persist. But, he said, "it doesn't look likely to continue," and he estimated that maybe a fourth of the gain will prove lasting.

Tax payments by individuals also rose a bit faster than expected. The CBO had forecast in March that they would rise 11.1 percent this year, but now they are expected to grow 14.6 percent.

As a result of these surprises, the CBO expects corporate tax revenue to account for 13 percent of all federal tax revenue this year, up from 10.1 percent last year. Individual taxes will account for 43 percent of the total, the same as last year, the CBO projects. Social Security, Medicare and other taxes account for the rest.

The gain in projected revenue was partly offset by spending increases approved by Congress and the president since the March forecast. They included extra spending in Iraq and Afghanistan and for veterans.

The CBO is required to base its forecasts on the assumptions that federal tax law and spending commitments will not change. This is designed to provide lawmakers with guidance as they decide whether and how to alter those policies.

But clearly many of those policies will change. Congress is debating whether to extend or alter the recent tax cuts, has begun discussing how to bolster Social Security's finances, and has been surprised before by swings in economic conditions.

Thus, "everything we say today is going to be wrong," Holtz-Eakin cautioned. "What will actually happen will depend on the policies adopted by Congress going forward."

House Budget Committee Chairman Jim Nussle (R-Iowa) attributed the lower deficit projection to "successful leadership and policies."