WASHINGTON (AP) — The U.S. government ran a monthly budget surplus in June, putting it on course to record the lowest annual deficit since 2008.

The Treasury Department said Friday that its June surplus totaled $71 billion, following a $130 billion deficit in May. The government also ran a surplus in June 2013, bolstered by dividends from Fannie Mae, the mortgage giant under federal conservatorship for the past six years.

For the first nine months of this budget year, the deficit totals $366 billion, down 28 percent from the same period in 2013. Tax receipts are up 8 percent compared to the prior year-to-date, while spending has increased 1 percent.

The Congressional Budget Office is forecasting a deficit of $492 billion for the full budget year ending Sept. 30. That would be the narrowest gap since 2008.

In 2008, the government recorded a deficit of $458.6 billion, which was the record high for deficits up to that time.

But with the outbreak of the recession, deficits soared to unprecedented levels, exceeding $1 trillion for four consecutive years. Tax revenues fell during that period, while government boosted spending in an attempt to stabilize the financial system and provide relief to people who had lost jobs.

The yearly deficit peaked at $1.4 trillion in 2009 during the worst of the financial crisis. It gradually fell from there, plunging to $680.2 billion last year.

Over the next decade, CBO is projecting that the deficits will total $7.6 trillion.

The deficit will fall to $469 billion in 2015 before rising again and topping $1 trillion annually starting in 2023, according to the CBO. Spending on the government's major benefit programs, including Social Security and Medicare, will drive those increases as more baby boomers retire.

Republicans have accused President Barack Obama of failing to propose significant cost cuts to reduce soaring entitlement costs. Democrats counter that Republicans would rather impose sharp cuts on needed government programs than impose higher taxes on the wealthy.

Neither side is expected to make major concessions in this congressional election year. But the budget wars of the past three years have subsided at least for a brief time. An agreement was reached in December on the broad outlines for spending over the next two years. The agreement will allow Washington to avoid the gridlock that culminated in October's 16-day partial shutdown of the government.

The budget cease-fire also includes legislation that will suspend the government's borrowing limit through March 15 of next year. That puts off another battle over raising the debt ceiling until a new Congress takes office in January.