The United States posted an $80 billion budget deficit in December, slightly smaller than economists had expected, Treasury Department data showed on Wednesday.

The December deficit was narrower than December 2009's gap of $91 billion and just under the $82 billion forecast by economists in a Reuters poll.

The government has now posted a budget deficit for 27 straight months, the longest streak on record, the Treasury Department said.

A Treasury official said there were a number of unusual factors that affected the deficit comparison with the prior year. For example, the department pulled some spending intended for January 2010 into December 2009 to work around the timing of the New Year's Day holiday, which fell on a Friday and created a three-day weekend.

There was also an unusual revenue gain in December 2009, when the Federal Deposit Insurance Corp collected three years' worth of pre-paid fees from banks to strengthen its deposit insurance fund.

Receipts rose to $237 billion in the latest month, up from $219 billion a year earlier. Outlays rose to $317 billion from $310 billion in December 2009. (Reporting by Emily Kaiser, Editing by Neil Stempleman)