Guardian News and Media/London

The inquest into the death of a prisoner, jailed for stealing a gingerbread during the riots in 2011, opens in London today.

The man had a serious history of mental illness and physical problems, which his foster family say were not addressed by the prison.

James Best, 37, died after collapsing at Wandsworth prison, south London, in August 2011.

He had been convicted of theft at Croydon magistrates court and remanded in custody awaiting sentence. He had stolen the cake from an already looted bakery in Croydon. It was his first time in prison.

In July 2011, he had been convicted of criminal damage and sectioned under the Mental Health Act after he had self-harmed on a London street.

Best also suffered physical problems including Crohn’s disease, arthritis, high blood pressure and asthma.

On the afternoon of August 8, Best went to the prison gym, where he was described as “training really hard, really going for it”.

After the workout he returned to his cell and collapsed.

An ambulance was called but by 5.10pm he had been pronounced dead, having suffered a heart attack.

Lincolnshire-born Best was placed in care at the age of 12 months. He was adopted and lived in Hastings until the adoption broke down when he was 15.

He was then fostered by Dolly Daniel and stayed with her family until he was 18. At the time of his arrest, he was living in Croydon.

Daniel will be attending the inquest and believes her foster son was let down by the justice and prison system.

She criticises the courts for sending Best to prison “for stealing a cake from an already looted bakery” and not taking Best’s mental health into account.

She says the inquest will raise issues about Wandsworth’s failure to medically assess Best and claims he should not have been allowed to use the gym because of his poor physical health.

At the time, magistrates were issued with advice from Her Majesty’s Courts and Tribunals Service to disregard normal sentencing guidelines for offences committed as part of the 2011 riots. “His mental and physical problems were not addressed and he was wrongly cleared to use the prison gym,” she said.

Victoria McNally, a case worker for the campaigning charity Inquest, describes Best as a highly vulnerable man, whose “death was a tragic end to a troubling sequence of events. We hope that this inquest will examine whether the procedures and safeguards designed to protect prisoners were properly followed.”

Wandsworth has a troubled history. A 2011 report by the chief inspector of prisons found the “safety of prisoners to be a matter of serious concern.