The UK posted a smaller-than-expected budget surplus in July as government spending increased.
A growing wage bill and higher spending on goods and services was behind the lower surplus, which fell to £1.3bn.
Analysts had been expecting a £2.7bn surplus, which would have been less than the £3.6bn booked last year.
The government typically posts a surplus in July because of individuals filing self-assessed income tax returns.
The government banked £9.4bn from self-assessed income tax payments in July, £300m more than the same time last year.
However, the Office for National Statistics, which published the figures, warned that tax figures can vary depending on when people pay HMRC.
In June, government borrowing climbed to £7.2bn, a sharp increase driven by higher debt interest payments and rising spending on services.
It was the highest June borrowing figure since 2015.
July’s surplus figure, released on Wednesday, forms part of a complicated picture for the UK economy, which shrank by 0.2% between April and June, the first economic contraction since 2012.
The unemployment rate increased slightly to 3.9% in the three months to the end of June, but this remained close to a 44-year low.
Nevertheless, median disposable household income was forecast to grow by 1.4% to £29,400 over the course of the year.
And people are feeling the effects of that extra money in their pockets. Household spending grew by 0.5% between April and June as wage growth hit an 11-year high
It has never been cheaper for the government to borrow, which it does by issuing bonds.
The interest paid on 10-year UK Treasury bills has fallen to historic lows. They now return just 0.5%.