WASHINGTON (Reuters) - The federal budget deficit for the just-ended 2012 fiscal year shrank by $207 billion from the prior year, but still marked its fourth straight year above $1 trillion, Congress’ budget referee estimated on Friday.

The deficit equaled about 7 percent of U.S. economic output, down from 8.7 percent in 2011, 9 percent in 2010 and 10.1 percent in 2009, but it was still greater than in any other year since 1947, the non-partisan Congressional Budget Office said.

Economists generally consider any deficit that exceeds 3 percent of U.S. gross domestic product to be unsustainable in the long term.

CBO said a $75 billion surplus September surplus helped to hold the full-year fiscal 2012 deficit to $1.09 trillion, compared with a $1.297 trillion deficit in fiscal 2012.

The September surplus was just the second month in the black for the U.S. government since September 2008, when the country was in the throes of a financial crisis. The September data was buoyed by strong quarterly corporate income tax payments and $7 billion from the sale of shares in bailed-out insurer American International Group.

The U.S. Treasury is expected to release official final figures for the year ended September 30 next week.

Republicans, including presidential nominee Mitt Romney, have long been hammering President Barack Obama for overseeing four straight years of trillion-dollar deficits during his time in office. Democrats have countered that these were necessary to avoid another depression and help dig out of a deep recession they inherited.

Whether the U.S. deficit will mark a fifth year above $1 trillion in fiscal 2013 depends on how Congress handles the year-end “fiscal cliff” of expiring tax cuts and automatic spending cuts.

If that massive fiscal tightening happens as scheduled, the deficit could be as low as $641 billion next year, according to a CBO estimate in August. But if Congress keeps current tax rates in place and finds a way to avoid the spending cuts, CBO estimates the deficit at about where it is now -- $1.04 trillion.

In September’s rare surplus, the CBO estimated that receipts grew $23 billion compared with a year earlier, while outlays shrank by $115 billion.

Most of the spending decline was the result of calendar shifts associated with benefit payments, but adjusting for this, there were some notable changes.

Net payments to government-controlled housing finance giants Fannie Mae and Freddie Mac fell by $7 billion in September because they did not need any capital injections. Outlays for unemployment benefits fell by $6 billion while military spending fell by $5 billion.

For the full fiscal year, total receipts grew 6.4 percent to $2.45 trillion, while outlays fell 1.6 percent to $3.54 trillion, CBO estimated.

Individual income tax receipts rose 3.4 percent while corporate income tax collections rose 33.7 percent. Most categories of spending fell, except for Social Security benefits, which rose 5.9 percent, to $762 billion, and Medicare, which rose 3.2 percent to $469 billion after adjusting for offsetting receipts.