More than 260,000 diabetes inpatients experienced a medication error during their hospital stay last year - putting them at risk of lasting harm or death, a report has warned.

The charity Diabetes UK said that of these, 9,600 diabetes inpatients experienced a serious and potentially life-threatening episode of hypoglycaemia because of poor insulin management during their hospital stay.

More than a million people with diabetes were admitted to hospital last year, and one in six hospital beds are currently occupied by people with diabetes. This number is expected to rise to one in four by 2030.

The report was compiled from visits to hospitals across the UK where the authors spoke to patients with diabetes, inpatient teams, healthcare professionals and hospital managers.

The charity said it is now calling for hospitals to adopt six key requirements which would make them safe for people with diabetes, lead to better patient experiences, and shorter lengths of stay.

Inpatients with diabetes have higher infection rates and longer lengths of stay (one to three days longer than patients without diabetes), leading to greater NHS spending and workload.

Diabetes inpatient care costs the NHS £2.5 billion a year - 11% of the annual inpatient budget.

Diabetes UK said adopting its recommendations and having the right workforce in place could significantly reduce NHS spending and alleviate the strain on services.

For example, investing £5 million on new diabetes inpatient specialist nursing services in 54 trusts would yield savings of £14 million a year, a net saving of £9 million annually.

It also suggests better training for health care professionals to help them understand diabetes and more support to help hospitals learn from mistakes.

Emily Watts, the charity's inpatient programme manager and co-author of the report, said: "Nine thousand six hundred people experiencing a severe, potentially life-threatening episode of hypoglycaemia because of inadequate care whilst in hospital, a place where people should feel supported and safe, is shocking and unacceptable.

"We hope our report will serve as a wake-up call, and lead to system-wide changes which make hospitals safe for people living with diabetes.

"Over a million people with diabetes spend time in hospital every year.

"It's essential that hospitals are safe places for each and every one of these people. But the sad truth is that currently, not all of them are.

"Everything recommended in our report already exists in certain hospitals across England. We want hospitals to stop working alone, and start learning from each other's successes."

Diabetes UK chief executive, Chris Askew, said: "The NHS is under immense strain, and diabetes is just one of the complex issues competing to be a priority.

"However, the number of diabetes inpatients receiving inadequate levels of care is a clear reflection that more must be done to make hospitals safe for those living with diabetes.

"The evidence clearly shows that fully resourced, proactive diabetes inpatient teams and an educated inpatient workforce can lead to happier, better supported patients and shorter lengths of stay.

"We will continue to work for better care for people with diabetes until every patient feels safe in hospital, from the time of admission to the point of discharge."

A spokeswoman for NHS England said: "NHS England has recently invested £10 million to increase the number of specialist diabetes nurses working in hospitals, and evidence shows they help reduce lengths of stay and medication errors for patients with diabetes.

"As we draw up the long term plan for the NHS, we need to build on existing work, including the Diabetes Treatment and Care programme, to help tackle this growing problem."