WASHINGTON — The federal deficit fell to $1.1 trillion in the 2012 fiscal year, down from about $1.3 trillion a year earlier, the Obama administration said on Friday.

That is the smallest deficit since 2008 but represents the fourth year in a row that the deficit has exceeded $1 trillion. Before the recession, which prompted huge federal spending and large tax cuts, the deficit had never exceeded half a trillion dollars.

The gap between government receipts and government spending — about 7 percent of economic output in the 2012 fiscal year, down from 8.7 percent in the 2011 fiscal year — has become a heated election-year political issue.

Republicans have hammered the Obama administration for not doing enough to control deficits and aid growth. “We’ve had four budgets, four trillion-dollar deficits,” Representative Paul D. Ryan of Wisconsin said during the vice-presidential debate on Thursday evening. “A debt crisis is coming. We can’t keep spending and borrowing like this. We can’t keep spending money we don’t have.”