Two NHS trusts breached the human rights of a Croydon man who died in prison weeks after being arrested for stealing gingerbread from a looted bakery during the 2011 riots, the High Court heard.

St George's Healthcare and the London Ambulance Service (LAS) failed to urgently treat James Best after he suffered a heart attack at HMP Wandsworth four years ago, his family claim.

The 37-year-old died in his cell on September 8, 2011 while awaiting sentencing for the theft.

His foster mother and brother launched legal action after learning of delays in his treatment at an inquest into his death at Westminster Coroner's Court in 2013.

Their lawyers argue prison medics, employed by St George's, were too slow to call 999 when Mr Best fell ill and that this was followed by an "unreasonable delay" in LAS dispatching paramedics to the jail.

It is claimed the actions violated Articles 2 and 3 of the European Convention of Human Rights, which protect the right to life and safeguard against cruel, inhuman and degrading treatment.

At the opening of a civil trial at the Royal Courts of Justice yesterday afternoon, Kirsten Sjovoll, the family's barrister, said the NHS trusts had a legal duty to provide care for prisoners if they became aware of "a real and immediate risk to life".

She told the court: "A prisoner who is detained by the state has had the opportunity to care for themselves removed.

"Mr Best was vulnerable. He was detained by he state, which had therefore assumed responsibility for his care.

"Mr Best was dependant on the state to take all reasonable measures to protect his life."

The court heard Mr Best, a former chef with a history of mental and physical health problems, collapsed after taking part in a gruelling gym session.

A nurse was called to his cell at 4.19pm but did not summon an ambulance until 13 minutes later.

The 999 call lasted a further 13 minutes as LAS initially failed to prioritise it as urgent, the court heard.

Paramedics arrived at the prison 30 minutes after the prison nurse had received the initial call.

Ms Sjovoll told the court earlier intervention and a quicker response "might have had a real prospect of altering the outcome for Mr Best."

She said: "Within one or two minutes at most an ambulance should have been called.

"We are talking about a life-threatening situation. Seconds count and minutes matter."

She added: "It was reasonable to expect that the ambulance could and should have been afforded higher priority and dispatched earlier."

Mr Best was particularly vulnerable due to his health problems, said the barrister, who added the manner of his death would have been "very distressing".

In tearful evidence to the court, Donna Daniel, who became Mr Best's foster mother when he was 15, said she had taken the case to court because both trusts had refused to apologise.

She said: "We thought James deserved respect and dignity.

"For a decade of my life I worked as am NHS complaints manager. A lot of my work was with bereaved families and we always treated them better than we have been treated."

Owen Daniel, Mr Best's foster brother, added: "We are really looking for an apology for the shocking shortcomings that were highlighted at the inquest.

"We are not looking to change the world or make loads of money. We are just looking for a bit of respect for James."

Nancy Collins, a solicitor at Irwin Mitchell, which is representing the family, said: "James's family have been completely devastated by his death and the last four years have been an extremely difficult time for them."

Both NHS trusts deny breaching the Human Rights Act.

The trial continues.