A 16-year-old boy who died in his classroom at a South Carolina school suffered heart failure after drinking too much caffeine, a coroner has ruled.

Davis Cripe had drunk a large Mountain Dew, a McDonald’s latte and an energy drink two hours before he collapsed.

Ingesting such a large amount of caffeine over such a short period of time caused a condition known as cardiac arrhythmia, where the heart stops beating properly.

In his judgment, Richland County Coroner Gary Watts drew attention to the dangers of drinking too much caffeine.

Stressing that it was the speed at which Mr Cripe drank the caffeinated drinks rather than the actual amount, the coroner said "the same amount of caffeine on another day may have been right".

"You can have five people line up and all of them do the exact same thing with him that day, or even drink more, and it may not have any type of effect on them at all. That is what’s so dangerous.”

A healthy adult can consume up to 400 milligrams of caffeine a day, or around four cups of coffee, without any adverse effects, according to the online caffeine encyclopedia Caffeine Informer.

Figures from the site’s database would suggest that Mr Cripe consumed just under 500 milligrams of caffeine before collapsing.

The caffeine content of energy drinks varies hugely depending on the brand. The 10 Hour Energy Shot drink, manufactured by Eternal Energy, contains 422 mg - exceeding the safe daily limit.

Energy drinks have also been linked to “caffeine intoxication”, according to research published in the International Journal of Health Sciences in 2015.

Symptoms include anxiety, insomnia, gastrointestinal irritation, muscle twitching, restlessness and periods of inexhaustibility

David Cripe’s father, Sean, said he hoped his son’s death would instruct other parents to be more vigilant about their children’s caffeine intake.

"I stand before you as a brokenhearted father and hope that something good can come from this," he said.