A 16-year-old girl in England died from an extremely rare condition called Rapunzel syndrome, according to news reports.

The teen lost consciousness on Sept. 7; she was taken to the hospital and died shortly after, the Independent reported Sept. 19.

Though the name is inspired by the fairy tale princess with incredibly long hair, Rapunzel syndrome does not have a happy ending. The condition occurs when a person has a hair ball in his or her stomach, and that hair ball has a "tail" that extends into the intestines. [27 Oddest Medical Cases]

The large mass of hair — called a "trichobezoar" — can cause digestive problems, such as nausea and vomiting, as described in one woman's case from September 2016.

In the teen's case, however, the hair ball ultimately caused a condition called peritonitis, or inflammation of the lining of the abdomen, according to Lincolnshire Live. This condition can lead to body-wide inflammation that causes organs to shut down.

It's possible that a trichobezoar could lead to an ulcer, or open sore, in the lining of the stomach, said Dr. Cathy Burnweit, chief of pediatric surgery at Nicklaus Children's Hospital in Miami, who was not involved in the teen's case. If the ulcer perforated the stomach, bacteria from the hair ball could spill into the abdominal cavity, causing an infection and inflammation, she said.

Burnweit has removed trichobezoars from patients. The large balls of hair form when a person ingests his or her hair over several years, and that hair builds up into a hard mass, Burnweit told Live Science. "You think about a hair ball as being spongy," but these are rock-hard and shaped like the stomach, she said.

Large trichobezoars can block a person's gastrointestinal tract, making it difficult for him or her to eat and leading to malnutrition, Burnweit said; they also cause bad breath.

The masses of hair need to be removed surgically, Burnweit said, and after surgery, patients typically need psychological treatment to address why they are eating their hair in the first place.

Hair-pulling disorder

People who compulsively swallow their own hair are said to have a psychiatric disorder called trichophagia. The disorder is related to a slightly more common one in which people have an irresistible urge to pull out their hair, called trichotillomania or hair-pulling disorder.

Hair-pulling disorder is listed in the official manual that psychiatrists use to diagnose mental illnesses, said Dr. Katharine Phillips, a professor of psychiatry and human behavior at the Alpert Medical School at Brown University. Phillips was not involved in the British teen's case. [Psychiatry's New Guide: 6 Things You Should Know]

The condition is thought to be related to obsessive-compulsive disorder (OCD), Phillips told Live Science. But whereas OCD is characterized by repetitive and intrusive thoughts, or obsessions, as well as repetitive, compulsive behavior, hair-pulling disorder is "purely behavioral," Phillips said. In other words, people with the condition don't think about pulling their hair; they simply do it.

The condition doesn't apply to people who occasionally pull out a gray hair, however. People with hair-pulling disorder cannot stop pulling their hair, despite their attempts to do so, Phillips said. Trichotillomania can impact day-to-day life; people with this disorder may feel ashamed that they can't stop pulling their hair, or they may feel a need to cover up bald spots that have resulted from the disorder, Phillips said.

An estimated 1 to 2 percent of people in the U.S. have trichotillomania, Phillips said, and within this group, between 5 and 20 percent have trichophagia. Hair-pulling disorder typically starts when children are between 10 and 13 years old, she said. It can involve pulling hair from any part of the body, not just the scalp, and in most cases, people pull hair from more than one area. About 90 percent of the adults with hair-pulling disorder are women, she said. In younger patients, more males are affected, but the majority of cases are still in females.

Phillips noted that a type of therapy called habit-reversal training can be "quite effective" for treating hair-pulling disorder. The therapy involves having people first recognize when they pull their hair and try to identify any specific triggers of the behavior. Next, the patients try to avoid these triggers. The "heart of the treatment" involves something called "competing response training," Phillips said. With this method, people with the disorder learn to do a physically incompatible action when they get the urge to pull their hair. For example, they might make a fist, sit on their hands or do an activity such as knitting — anything that doesn't physically allow them to pull. Certain medications may also be helpful, Phillips added.

Originally published on Live Science.