The Treasury Department announced a June surplus of $116.5 billion, according to a report (link opens as PDF) released today, the largest for a single month in five years. However, the country remains in deficit for the fiscal year to date.

After May's deficit clocked in at $139 billion, a one-time $66 billion rescue repayment from Fannie Mae and Freddie Mac helped boost June's numbers significantly. Still, removing the one-time payment, the country still managed to pull itself out of the red with a $50.5 billion surplus.

While overall June receipts (inflow) totaled $287 billion, total outlays came in at just $170 billion after May's $336 billion in spending.

Source: Treasury Department

Through the first nine months of the budget year, the deficit has totaled $509.8 billion, according to the Treasury. That's $394.4 billion lower than the same period the previous year. The Congressional Budget Office forecasts the annual deficit will be $670 billion when the budget year ends on Sept. 30. If correct, that would be well below last year's deficit of $1.09 trillion and the lowest since President Barack Obama took office. It would still be the fifth-largest deficit in U.S. history.

-- Material from The Associated Press was used in this report.

link