WASHINGTON — The federal deficit for the first three months of the budget year is up slightly from the same period a year ago, reflecting the absence of a special payment from mortgage company Freddie Mac that helped narrow the gap in 2014.

The Treasury Department reported Tuesday that the government ran a deficit of $176.7 billion for the first three months of the current budget year, which began Oct. 1. That is up 2.4 percent from a $172.6 billion imbalance for the same three months in the 2014 budget year.

However, last year's books were helped by a special $24 billion payment Freddie Mac provided the government for support it received during the financial crisis. Budget experts still believe this year's deficit will still be lower than last year.

Both Freddie Mac and Fannie Mae are still making quarterly payments to the government, even though the payments from both companies now have exceeded the $187.3 billion in taxpayer aid they received during the financial crisis.

For December, the government had a $1.9 billion surplus, down from a surplus of $53.2 billion in December 2013, the month of the special Freddie Mac payment. The government has run surpluses in 25 of the last 61 Decembers, a month when corporate tax payments boost revenues.

The Congressional Budget Office is forecasting that the deficit for the 2015 budget year through September will fall to $469 billion from $483.3 billion in 2014. That would be an improvement of 3 percent for the full year.

Through the first three months of this budget year, revenues totaled $739.5 billion, up 11 percent from the same period a year ago. Outlays came to $916.1 billion, a 9.2 percent increase from a year ago.

Congress in December approved a $1.1 trillion spending bill that will fund most of the government through Sept. 30, eliminating the threat of a government shutdown through the current budget year. The one exception was the Department of Homeland Security, which was funded only to Feb. 27. Republicans intend to use the spending deadline for Homeland Security to try to force President Barack Obama to roll back his immigration policy that removed the threat of deportation from millions of immigrants living in the United States illegally.

Congress, with both the Senate and House under Republican control, will get a proposed budget from Obama covering the 2016 fiscal year on Feb. 2, setting off months of debate over setting spending priorities for next year.

After this year, the CBO is forecasting that deficits will resume rising as baby boomers retire and Social Security and Medicare costs rise. The CBO and other budget experts have warned that the current trajectory for the deficit is unsustainable and could eventually lead to a fiscal crisis.

The $483.3 billion deficit for 2014 was the smallest since George W. Bush's last full year as president. When measured against the size of the economy, the 2014 deficit equaled 2.8 percent of gross domestic product, below the average for the last four decades. By comparison, the deficit for 2013 was $680 billion, or 4.1 percent of GDP.

The deficit topped $1 trillion annually for four consecutive years from 2009 to 2013. The government struggled with a deep recession, which cut into tax revenues and forced higher spending for safety-net programs such as unemployment benefits and food stamps.

The improved deficit picture for 2014 reflected slower growth in spending due to lower-than-expected health care costs, as well as a 2011 budget pact with Republicans that sharply curbed agencies' operating budgets. Obama reached an agreement with Republicans in Congress for a tax increase on higher income earners at the beginning of 2013.

Since that tax increase, Obama and the GOP-controlled House have steered clear of further large-scale efforts to reduce the deficit. But with Republicans now in control of both chambers of Congress, they are expected to try to rein in the deficit even further. Obama, however, has said that any large-scale budget deal needs to include higher taxes, something that Republicans oppose.