An unexpected surge in government borrowing in August, driven by persistently higher inflation, has added to pressure on Chancellor John Healey as he prepares to deliver his first Budget at the end of October.

Borrowing – the difference between tax receipts and government spending – was £18.3bn in August, almost a fifth higher than the year before, the Office for National Statistics (ONS) said.

That figure was £3.5bn more than official forecasters expected.

Inflation rose to its highest rate in five months in August in the UK, driven up by higher petrol and diesel prices.

Although tax receipts were higher in August compared with a year ago, spending on public services, benefits, and other costs grew more as the pace of price rises increased.

The interest the government is paying on its debt rose to £8.8bn, its highest August level since records began in 1997.

The cost of servicing that debt comes as the government is under pressure to spend more on defence and cost-of-living support to households, said Martin Beck, chief economist at WPI Strategy.

He said it was important not to “overinterpret a single month given the volatility in the numbers”, but added that there were some “concerning elements”.

He said the cost of paying the interest on government debt is likely to rise in the coming months.

While the figures were an “unwelcome setback”, he said the government tends to look at the OBR’s medium-term fiscal forecast – so what it expects for the public finances three years into the future.

“But even there, the chancellor’s got problems,” he said. “The cost of that interest has gone up. That’s going to feed through into more borrowing.”

The Institute for Fiscal Studies (IFS) warned that spending on debt interest is “a worryingly large share of overall government spending and has been pushed up” since the last official forecasts from the Office for Budget Responsibility (OBR).

Research economist Nick Ridpath said: “Both higher borrowing costs and higher inflation make life harder for a chancellor who is looking to bring down borrowing and to spend more on government priorities.”

About a quarter of the interest paid on UK public sector debt is linked to the Retail Prices Index, a measure of inflation which tends to be a higher rate than the Consumer Prices Index measure used to calculate the UK’s headline rate.