Rapunzel
In this handout photo provided by Disney Resorts, actress Mandy Moore poses with Rapunzel during a visit to the Magic Kingdom Park on March 6, 2017 in Lake Buena Vista, Florida. Getty Images

A 16-year-old British girl died from stomach infection brought about by a ball of hair that she had chewed and ingested over several years, a rare condition termed the “Rapunzel syndrome,” usually triggered by emotional instability.

Jasmine Beever, Skegness, Lincolnshire, was rushed to hospital after falling acutely ill Sept. 7. The staff at the hospital tried life-saving resuscitation, but she died soon after, LincolnshireLive reported.

An autopsy revealed Beever was suffering from peritonitis, an inflammation of the thin layer of the abdominal wall.

The condition develops when there is a fungal or bacterial infection in the stomach, which in Beever's case was caused by the infected hairball.

Eventually, this led to a burst ulcer that caused her organs to shut down, according to LincolnshireLive.

Few days before her death, she had attended the funeral of her grandfather, Daily Mail reported.

Following her death, tributes flooded in for Jasmine on Facebook.

"God took an angel last night. I hope you're cuddled and kept real tight. Miss ya already. Our clingon. Sleep tight," one friend wrote.

Beever's best friend, Billy Jo Ashwell, who has known her since they were toddlers, has decided to raise money to help her family. Till now, the campaign has raised 1,117 pounds ($1,516).

Donna Marshall, Ashwell's mother told LincolnshireLive: "Jasmine collapsed at college, she went home to bed and then later she came out in blotches and the rest is sad news." "The ambulance came for her and when she got to hospital she was brought back to life for 15 minutes."

She also said on Facebook that Beever had been "sucking and chewing her hair for years."

People who swallow their own hair, and which is then lodged in their digestive tract, are often diagnosed with Rapunzel syndrome or trichophagia, a report said, citing the U.S. National Library of Medicine National Institutes of Health.

It is a variety of trichobezoar, which is "a collection of hair that collects in the stomach and fails to pass through the small intestine."

According to Journal of Neonatal and Pediatric Medicine, most reported cases of this syndrome were of women with underlying psychiatric problem.

Rapunzel syndrome was first described in 1779 by a French doctor, M. Baudamant, and it entered into medical literature in 1968.

Researches suggest that there have been over 100 reported cases of this condition in medical literature, according to TrichStop, an online resource for people who suffer from compulsive hair pulling.

If someone is facing a persistent problem of pulling out their hair and then chewing on it, and if the act is unstoppable, then they must seek help.

"Eating your own hair could be related to an underlying emotional or psychiatric issue such as depression or a reaction to stress factors such as being bullied, moving house, divorce, or physical, emotional or sexual abuse among others — issues that are important to address to live a healthy, happy, fulfilling life," the website said.