Giving evidence at the town's coroners' court on Wednesday, Dr Mark Withers, a consultant anaesthetist at Chesterfield Royal Hospital, said Mr Yates was admitted to A&E on the evening of July 23 last year.

"He was in a pretty bad way," Dr Withers added.

"Everything was done to try and give him a chance to survive - but as the evening went on it sadly became clear that James's death was probably inevitable."

Dr Withers said Mr Yates died at 6.35am on July 24 because of the 'complete failure of his body as a result of the ecstasy overdose'.

Pathologist Dr Andrew Hitchcock told the inquest that the cause of Mr Yates's death was 'multiple organ failure due to ecstasy toxicity'.

The court heard how foster carer Jacqui Kirk looked after Mr Yates when he was aged between 15 and 18.

She said: "He was very complex and very vulnerable.

"He would do anything for friendship.

"If someone said 'take these, you'll like them', he'd have taken them.”