Updated

Delaware’s highest court overturned a ruling that found one teen culpable in the death of another after she died from a rare heart condition while being attacked in the school bathroom.

The 17-year-old, who has not been identified because of her age, was convicted of criminally negligent homicide in the 2016 death of Amy Joyner-Francis.

On Thursday, Delaware’s Supreme Court found that the girl could not have acted with criminal negligence or, even if she did, it would be unjust to blame her for Joyner-Francis’ death, given how unforeseeable it was that the fight would lead to her dying of cardiac arrest.

An autopsy revealed Joyner-Francis had a rare and undetected heart condition that let to sudden cardio death, aggravated by stress from the fight.

A Family Court judge originally convicted the teen of conspiracy for helping plan the attack that took place at Howard High School of Technology in Wilmington. She also was seen on video kicking Joyner-Francis as she laid on the floor.

The Associated Press contributed to this report.