The monthly budget deficit narrowed to $27.4 billion in January from $49.8 billion in the same month a year earlier, partly because some benefit payments normally made in January were shifted to December, the Treasury Department said on Friday.

About $16 billion of military active duty pay, veterans' benefits and Medicare payments were accelerated to December 30 since January 1 fell on a Sunday, which effectively reduced government outlays in January.

During the first four months of fiscal 2012, which began October 1, the cumulative deficit narrowed to $349.1 billion from $418.8 billion in the comparable first four months of fiscal 2011.

The government's spending in January this year was $261.7 billion, down from $276.3 billion in January 2011. So far in the first four months of fiscal 2012, outlays are down to $1.139 trillion from $1.177 trillion in the comparable year-earlier period.

The January deficit figure was very close to an estimate published earlier this week by the Congressional Budget Office, which predicted a $27-billion monthly shortfall.

The CBO last week said that it expected the United States would rack up a $1-trillion-plus deficit for a fourth straight year in fiscal 2012. It forecast a $1.08 trillion gap for the full fiscal year, which ends September 30, only moderately lower than the $1.3 trillion deficit posted in fiscal 2011.

The government took in more money, mostly from taxes, in January this year than it did a year earlier. Receipts for the month totaled $234.3 billion, up from $226.6 billion in January 2011.

For the first four months of fiscal 2012, total government receipts rose to $789.8 billion from $758.3 billion in the comparable fiscal 2011 period.

(Reporting By Glenn Somerville; Editing by Andrea Ricci)