The US budget deficit topped $1 trillion for a fourth consecutive year, but a modest improvement in economic growth helped narrow the gap by $207bn compared with last year.
The US treasury department said on Friday that the deficit for the 2012 budget year totaled $1.1 trillion. Tax revenue rose 6.4 per cent from last year to more than $2.4 trillion, helping contain the deficit.
The government's revenue rose as more people got jobs and received income.
Live Box 20121816112138306
Corporations also contributed more tax revenue than in 2011.
Government spending fell 1.7 per cent to $3.5 trillion. The decline reflected, in part, less defense spending as US military involvement in Iraq was winding down.
Barack Obama's presidency has now coincided with four straight $1 trillion-plus annual budget deficits - the first in history and an issue in an election campaign that ends in November 6.
Obama's Republican challenger, Mitt Romney, contends that Obama failed to achieve a pledge to halve the deficit he inherited by the end of his first term.
When Obama took office in January 2009, the Congressional Budget Office forecast that the deficit for that year would total $1.2 trillion. It ended up at a record $1.41 trillion.
The increase was due, in part, to higher government spending to fight the worst recession since the Great Depression of the 1930s. Tax cuts enacted under President George W. Bush and wars in Iraq and Afghanistan contributed to the deficits.
The budget gaps in 2010 and 2011 were slightly lower than the 2009 deficit as a gradually strengthening economy generated more tax revenue. But the deficits still exceeded $1 trillion.
Obama is campaigning for a second term with a pledge to cut deficits by $4 trillion over the next decade. He says he would do so by ending the Bush-era income tax cuts for higher-income Americans and by restraining the growth of spending.
Romney has said he would cut spending growth to help narrow the budget gap. He would cap spending at 20 per cent of the economy by 2016. Spending in 2012 accounted for about 23 per cent of the economy.
The government borrowed about 31 cents of every dollar it spent in 2012.
The string of $1 trillion-plus deficits has driven the national debt above $16 trillion. The magnitude of that figure has intensified debate in Congress over spending and taxes but little movement toward compromise.
Many fear the budget deadlock will send the economy over a "fiscal cliff" next year, when tax increases and deep spending cuts will take effect unless a budget deal is reached.
Obama wants to eliminate the income tax cuts for families that make more than $250,000.
Republicans in Congress and Romney have resisted. They argue that with the economy still weak, the government should not be raising anyone's taxes.
Congress may address the budget crisis during a lame-duck session of Congress after the November elections.