The government borrowed less than expected in June, helped by higher tax receipts and a big drop in debt interest payments.
Borrowing - the difference between spending and tax income - fell to Â£18.5bn, according to the Office for National Statistics (ONS).
It is Â£400m lower than last June and below predictions by the government's independent forecaster.
But the ONS said borrowing is still the third highest for June on record.
The Office for Budget Responsibility had expected public borrowing to reach Â£21.1bn. Meanwhile, the ONS said that borrowing for April and May had been revised down by Â£7bn.
Ruth Gregory, deputy chief UK economist at Capital Economics, said that Chancellor Jeremy Hunt "now looks likely to have a little more wiggle room in the Autumn Statement to fund a few pre-election giveaways".
But she added: "With the full upward impact on borrowing from higher interest rates and weaker GDP growth still coming down the line, we continue to think any package of pre-election net tax cuts will probably need to be modest or swiftly reversed."
Mr Hunt said it was important to "avoid reckless spending".
"Now more than ever we need to maintain discipline with the public finances," he said.