Borrowing in December 2017 stood at £2.6bn, down from £5.1bn in December 2016.
The Treasury said income tax, national insurance contributions and VAT receipts had increased by £1.8bn.
In addition, a revision to EU payments saw the UK benefit by a £1.2bn rebate. This had been expected by the Treasury.
The impact of the collapse of facilities management firm and building contractor Carillion is not yet known, but it is expected to have a significant hit on the government’s finances.
The government has said it will stump up the cash to keep public services going following the company’s insolvency.
The ONS said Carillion held around 450 contracts with the UK government, accounting for around 38% of the company’s reported revenue.
In 2016, the Carillion’s overall revenue, including overseas projects, stood at £5.2bn.
The ONS also found that public sector debt has increased by more than £62bn to nearly £1.8 trillion.
This is despite the reclassification of housing associations as private operators in November 2017, which wiped more than £65bn from the public sector debt figures.
A Treasury spokesperson said: “We have made great progress in reducing the deficit by three quarters since 2010, but government debt is still far too high.
“Our balanced approach to government spending is getting debt falling, while investing in key public services and keeping taxes low.”