WASHINGTON (AP) — The U.S. government reported a rare surplus of $113 billion for April — the largest in five years and a sign of the nation's improving finances.

Steady economic growth and higher tax rates have boosted the tax revenue in recent months, keeping this year's annual budget deficit on pace to be the smallest since 2008. A smaller deficit is also likely to give negotiators more time to work out a deal on raising the nation's borrowing limit.

Through the first seven months of the budget year, the deficit was $488 billion, according to the Treasury. That's lower than last year's deficit of $720 billion over the same period.

Even with the improvement, the deficit for the full year will still be quite large: the Congressional Budget Office expects it will reach $845 billion when the budget year ends on Sept. 30. While that would be the first annual deficit below $1 trillion since 2008, it would still be the fifth-largest deficit in U.S. history.

The federal deficit represents the annual difference between the government's spending and the tax revenues it takes in. Each deficit contributes to the national debt, which recently topped $16 trillion.

A smaller deficit is taking pressure off of negotiations to raise the federal borrowing limit. Lawmakers and the Obama administration agreed in January to suspend the borrowing limit until May 18. But higher revenues and less spending will likely extend the deadline until the fall.

Revenue has risen 16 percent so far this budget year to $1.6 trillion. That's the biggest tax haul for the October-April period on record, a senior Treasury official said.

The government will also benefit next month from a $59.4 billion payment from mortgage giant Fannie Mae and a $7 billion payment from Freddie Mac. The mortgage giants are profitable again and are paying dividends to the government in return for the loans they received during the financial crisis.

In an interview with CNBC Friday, Treasury Secretary Jacob Lew said that in part because of Fannie's payment, the government's borrowing limit won't be reached until "at least after Labor Day" in early September. Many analysts had expected another budget battle this summer. In 2011, a dispute between the Obama Administration and Congress over whether to raise the limit lasted until the final day.

Despite the extra time, Lew urged Congress to "deal with this right away" and avoid another last-minute battle.

There is usually a surplus in April because that is when the government receives an influx of annual tax payments. But tax receipts this April are 28 percent higher than in April 2012. And the surplus is nearly twice as high.

The increases partly reflect higher tax rates that began this year. Social Security taxes rose 2 percentage points after a two-year cut expired. And income tax rates for the highest-earning 1 percent of the population also increased.

Accelerated dividend and bonus payments also boosted tax receipts earlier in the budget year. Many companies made special payments at the end of last year in anticipation that taxes would increase in 2013. As a result, income tax payments that weren't withheld jumped 40 percent in April compared with the same month a year ago.

Modest economic growth has also helped. Corporate income tax receipts have increased 16 percent in the first seven months of the budget year. And Goldman Sachs has estimated that better growth has boosted tax receipts by 7 percent a year since 2009.

Spending has declined 1 percent in the first seven months of the budget year. Defense spending has fallen $18 billion, or 5 percent. Spending on unemployment benefits has dropped $14 billion, or 21 percent. The Treasury Department has also recalculated the cost of its bank bailout program, as more of those funds have been repaid. That's lowered the cost of that program by $50 billion this year.

And across-the-board government spending cuts that began on March 1 will likely lower spending in the coming months.

President Barack Obama's administration has coincided with four straight $1 trillion-plus deficits.

The deficit reached a record $1.41 trillion in budget year 2009, which began four months before Obama was inaugurated. That deficit was largely because of the worst recession since the Great Depression. Tax revenue plummeted, while the government spent more on stimulus programs.

The budget gaps in 2010 and 2011 were slightly lower than the 2009 deficit as a gradually strengthening economy generated more tax revenue.

President George W. Bush also ran annual deficits through most of his two terms in office after he won approval for broad tax cuts and launched wars in Afghanistan and Iraq.