Updated

A teen girl suffered a heart attack aged just 17 after receiving her first school detention, The Sun reported Wednesday.

Tabatha McElligott, from Leigh-on-Sea, Essex, who was unaware she had a heart condition that could have killed her at any minute, was so shocked at getting in trouble for sneaking out of school without permission she collapsed.

"When we got to the gates, I could hear my teacher calling my name, and my heart started hammering. She began to tell us off, but my heart kept beating harder and harder, and her voice sounded really distant," she said.

McElligott, now aged 19, added, "I felt my legs turning to jelly, and then everything went black. I now know my heart was a ticking time-bomb waiting to go off."

Luckily a certified first responder got to Westcliff High School for Girls within three minutes to restart the teenager's heart.

She was hospitalized and experts later diagnosed a rare condition that causes the body to pump blood around the heart the wrong way.

Just 10 percent of sufferers survive beyond their first birthday but McElligott has now made a full recovery following surgery.

"I was off school for the rest of the term, so I never was given that detention!"

Click here to read more from The Sun.