A marked deterioration in the public finances means Sajid Javid will have to relax borrowing limits if the government is to boost spending and cut taxes before an early general election.

With the Treasury preparing for the the autumn budget, data from the Office for National Statistics (ONS) showed that the slowing economy and a series of accounting changes had made life more difficult for the chancellor.

Boris Johnson’s government has pledged higher spending for the NHS, schools and the police since it was formed in late July, but against the backdrop of an economy flirting with recession. The ONS said borrowing in the first five months of the financial year was up 28% on the same period a year ago, at more than £31bn.

In addition, changes to the way the ONS accounts for student debt and public sector pensions, together with new corporation tax data, means the size of the deficit in the last full financial year, 2018-19, has almost doubled. A deficit of £23.6bn has been revised up to £41.3bn.

Analysts said that if the trend for the first months of 2019-20 continued for the rest of the year the deficit would be close to £53bn, £12bn higher than the government’s fiscal watchdog, the Office for Budget Responsibility, estimated in March.

The government’s fiscal rules stipulate that borrowing in 2020-21 should be below 2% of national output after taking into account the state of the economy. Achieving that would require either spending cuts or tax increases amounting to 0.5% of gross domestic product – about £10bn.

Andrew Wishart, the UK economist at Capital Economics, said the existing fiscal target was “dead in the water”.

Wishart added Javid had “seen this coming and announced a review of the fiscal rules ahead of the autumn budget. A change to the rules will allow him to support the economy with fiscal stimulus. The upshot is that following six years of the deficit falling, it is now on the rise again.”

The ONS said the deficit was £6.4bn last month, £0.5bn lower than in August 2018, and the first year-on-year improvement in 2019-20.

However, the figures were also the first to take into account changes to the treatment of student loans.

“A high percentage of student loans are never repaid, but previously these losses only would crystallise in the public finances when the loan was written off after 30 years,” said Samuel Tombs of Pantheon Macroeconomics. “From today, these estimated losses are attributed to when the loan is made and show up as government spending. This change raises the estimate of public borrowing in 2018-19 by £12.4bn to £41.4bn, and will probably boost borrowing even more this year.

“Full-year borrowing will total £53.0bn in 2019-20, or about 2.4% of GDP, if the year-to-date trend is maintained. This clearly exceeds the 2.0% of GDP limit set by the Conservatives for the 2020-21 fiscal year. Chancellor Javid, therefore, will be forced to announce a new, looser fiscal rule in the upcoming budget in order to implement his plans for faster growth in government spending and to follow through on his ambition to cut taxes.”