Hospitals have been to be ordered to eliminate ambulance queues outside hospitals after two deaths were linked to delays handing over patients.

NHS bosses highlighted the "risk to patient safety" in a letter sent to all emergency hospitals.

It tells hospitals to stop using ambulances as emergency department "cubicles" and comes after two patients died in the east of England while waiting in the backs of ambulances for beds this month.

One woman went into cardiac arrest and died after waiting nearly an hour and a half in Addenbrooke's hospital car park, in Cambridge, on Sunday night.

Another woman also had a fatal heart attack in the back of an ambulance while waiting outside the James Paget University Hospital’s A&E department, in Gorleston, on October 11 for two hours.

The letter from NHS England chiefs states that handover delays represent "unacceptable clinical risk" for both patients waiting in ambulance queues and those who have called 999.

It adds that patients should be considered the "responsibility" of the hospital from the moment the ambulance arrives.

Trusts have also been ordered to ensure that "ambulances are not used as additional ED (emergency department) cubicles".

But according to ambulance sources, paramedics are effectively being used to staff A&E in a process known as cohorting.

It means paramedics have to look after patients either in rooms in A&E or in the back of ambulances and can't get away for the next call.

Ambulances are meant to get away in 15 minutes but the longest waits to handover patients were four to six hours, the sources said.

Martin Flaherty, managing director of the Association of Ambulance Chief Executives, said: "The ambulance sector is experiencing some of the highest levels of emergency activity in its history and this is regrettably leading to delays in the sector's ability to respond to some patients."

Unison's national ambulance officer Colm Porter said: "There's no let-up in the pressures for ambulance staff and in many cases they're getting worse.

"It's dangerous and unsustainable. Crews need to move on to the next emergency as swiftly as possible, but this isn't happening.

"Trusts must do everything they can to speed up the process and reduce the stress on the workforce."

It comes as the NHS experienced its busiest September on record, according to the latest performance data for the health service in England.

Last week, up to 500 people were waiting for an ambulance to be assigned after calling the East of England Ambulance Service.