A 14-year-old schoolgirl from Kennebunk, Maine, has been treated in hospital for second-degree burns after her iPhone 5c caught fire in her pocket whilst at school, reports the Morning Sentinel.

The girl – who has not been named – was said to have had the presence of mind to “stop, drop and roll,” at which point the phone fell from her pocket but her pants were still on fire. Classmates and a teacher at the Middle School of the Kennebunks helped the girl remove the pants, wrapping her in a blanket until rescue workers arrived.

“Immediately, smoke starts billowing from around the student,” said Jeff Rodman, principal of the Middle School of the Kennebunks. “She knew right away something was wrong and, in a panic, knew her pants were on fire caused by the cellphone.”

The girl was treated for her injuries at the Southern Maine Health Care in Biddeford, and released around 45 minutes later.

iPhones contain lithium-ion batteries, faults in which can, in very extreme cases, lead to a fire. A local repair shop owner, Andrew Rosenstein, stressed the rarity of these events.

Update: One unconfirmed report says that the phone made a ‘popping’ sound when she sat down, suggesting the student may have crushed the phone by sitting on it.