Hospitals are mothballing scores of wards, closing them to patients despite the NHS’s ongoing beds crisis, new figures reveal.

At the last count in September 82 “ghost wards” were recorded containing 1,429 empty beds, the equivalent of two entire hospitals, according to data provided by hospital trusts across England. It represents a sharp increase on the 32 wards and 502 beds that were unused four years earlier, statistics obtained under freedom of information laws show.

The closures, often a result of hospitals not having enough staff or the money to keep wards open, have occurred at a time when the health service is under unprecedented pressure and struggling to cope with demand for beds.

Doctors’ leaders reacted with disbelief to the revelations, which come after the NHS endured its toughest winter for many years, during which many hospitals ran out of beds.

“Given the pressures on the whole system, which suggest the NHS is 5,000 beds short of what it needed this winter, [this situation] is amazing and is almost always caused by not having enough money or staff,” said Dr Nick Scriven, the president of the Society for Acute Medicine.

This winter there was widespread alarm that the NHS’s policy of constantly cutting beds had gone too far, with A&E units full of patients on trolleys and people being looked after by paramedics in ambulances. Bed occupancy ran at 95% for much of December, January and February – far above the 85% “safe” level – as flu, cold weather and breathing problems led to unprecedented numbers of patients being admitted as medical emergencies.

Jonathan Ashworth, the shadow health secretary, who obtained the figures, demanded that ministers investigate why so many hospitals are using a practice that he called a scandal.

“We’ve just had doctors warning that the ‘winter crisis’ is likely to stretch into the summer and now our research reveals the extent to which beds that could be used to care for sick patients have been locked away. Given Tory ministers have allowed 14,500 beds to be cut from the NHS in the past eight years, to now learn that wards and beds have been left empty and unused is a scandal. Ministers should be ensuring beds are used at this time of crisis for the NHS,” said Ashworth.

Chronic shortages of nurses and doctors and the NHS budget squeeze are forcing hospitals to shut beds, Scriven said. “These findings will not surprise any clinical staff in the NHS. It reflects issues around staffing hospitals safely – in any equation the biggest cost is staff. In years and years of trying to balance books and achieve ‘efficiency’ savings, many hospitals will have taken the opportunities to shut clinical areas if they at all can.”

North Tees and Hartlepool NHS foundation trust said a lack of doctors and nurses meant it had nine wards comprising 270 beds lying empty in 2014, 2015, 2016 and 2017 – the highest number in England. Overall 92.7% of its beds were occupied last winter, well above the 85% level that health experts and A&E doctors believe is necessary to reduce hospital-acquired infections and ensure good care.

Last September one of its nine wards had been mothballed for 1,460 days – four years.

“In 2013, the trust implemented its transformational plan which involved optimising the use of space in our hospitals to improve patient pathways. As a result, we moved a proportion of inpatient activity from University hospital of Hartlepool to University hospital of North Tees. As with many NHS organisations, the shortage of specialist medical staff to fill vacancies and our unwillingness to compromise on patient safety meant that we feel this was the right decision to make,” a trust spokeswoman said.

Acute bed shortages this winter forced NHS trusts to open up an estimated 4,000 “escalation” – extra – beds, to help them cope. But staffing them proved difficult and many trusts had to hire costly agency personnel to look after patients.

Dr Chaand Nagpaul, the chair of council at the British Medical Association, said: “At a time when patients are facing unacceptably long waits to be seen and the indignity of being treated in hospital corridors, it is illogical for hospitals to have extra beds available but also unavailable, because they have been taken out of use. It is vital to look at why these aren’t being used when the NHS is under such pressure.”

Chris Hopson, the chief executive of NHS Providers, which represents hospital trusts, said: “Funding and staffing constraints mean it isn’t always possible to keep beds open. This is far from ideal given the NHS has at times been operating at full capacity, with some patients left waiting longer than they should for treatment given the lack of available beds.”

The NHS’s beds crisis was highlighted last week when the IT manager Martyn Wells revealed that he was put on a trolley in a windowless hospital store cupboard in Birmingham to recover after an operation to tackle a stage four malignant melanoma cancer that had spread to his stomach.

The Department of Health and Social Care said: “It is misleading to say hospital beds are being mothballed – trusts control the number of beds to meet demand and that’s why they were able to open 3,000 more at peak periods this winter.”