Hospitals are facing a rising backlog of repairs and out-of-date equipment because NHS funds are being used to shore up frontline services.

The cost of outstanding maintenance work that hospitals in England need to do has reached £4.3bn, including £458m of “high-risk” repairs, which if left unaddressed could threaten patient safety. They include leaking roofs and out-of-date scanners.

At the same time the NHS’s capital budget, which pays for repairs and new equipment, has been cut by £1.1bn this year and the money used to hire staff and meet waiting time targets.

It was due to be £4.8bn but an analysis by the House of Commons Library, commissioned by Labour, found that the fine print of last week’s budget confirmed that it is now only £3.7bn.

“Five years of Tory neglect has left many hospitals with ageing equipment and a growing bill for urgent maintenance,” said Heidi Alexander, the shadow health secretary. “However, rather than properly investing in our NHS, George Osborne has raided the money hospitals need to carry out these essential repairs and replace out-of-date equipment. This is bad for patient care.

Imperial College Healthcare NHS Trust, which runs five hospitals in London, admitted it was having trouble giving patients with suspected cancer vital diagnostic tests due to a “breakdown of old diagnostic equipment, and additional equipment needed to increase capacity.” Care quality commission inspectors last autumn found that at a children and adolescent mental health unit in south Oxford run by Oxford Health NHS Foundation Trust, “a leaky roof had caused substantial water damage which was reportedly highlighted 18 months ago. The smell of sewerage had been reported in a patient’s bedroom, but this problem continued for over a year without resolution.”

Chris Hopson, chief executive of NHS Providers, which represents hospitals, said it was shortsighted to cut the NHS’s capital budget.

“It’s very worrying that NHS capital is being squeezed. Our members understand the short-term rationale – the need to eliminate NHS deficits – but solving today’s financial problems mustn’t be at the expense of vital investment in the future,” he said.

The Department of Health said it had simply switched money from the capital budget to the revenue budget.

“This government is investing £10bn in the NHS’s own plan for the future and we’ve made almost £4bn available for capital projects this year which local trusts can apply for to undertake maintenance or building projects,” a spokesman said.

• This article was amended on 21 March 2016. An earlier version referred to a mental health unit in south Oxford run by Oxleas, rather than Oxford, NHS Foundation Trust.

