WASHINGTON — 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 says the 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.

Search photos available for purchase: Photo Store →

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.