WASHINGTON -- The federal budget deficit has topped $1 trillion for a fourth straight year. But a modest improvement in economic growth helped narrow the gap by $207 billion compared with last year.The Treasury Department said Friday that the deficit for the 2012 budget year totaled $1.1 trillion. Tax revenue rose 6.4 percent 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. Corporations also contributed more tax revenue than in 2011.Government spending fell 1.7 percent to $3.5 trillion. The decline reflected, in part, less defense spending as U.S. 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 3 weeks.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. 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 percent of the economy by 2016. Spending in 2012 accounted for about 23 percent 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.