The transgender teenager had once written a poem about the heartache of a boy born in a girl’s body. His words were raw and revealing.

In time, they would also seem haunting.

“I’ve been looking for him for years, but I seem to grow farther away from him with each passing day,” 14-year-old Kyler Prescott wrote last year. “He’s trapped inside this body, wrapped in society’s chains that keep him from escaping.

“But one day I will break those chains. One day I will set him free.

“And I’ll finally look in the mirror. And see me —

“The boy I was always meant to be.”

But months later, just shy of his 15th birthday and the promise of testosterone treatments to help make him a man, Kyler Prescott was dead.

Overcome with anxiety and depression, the Southern California teen committed suicide in May 2015, his mother said.

In the weeks before his death, Kyler had been treated for “suicidal ideation,” Katharine Prescott said: She had taken him to the emergency room at Rady Children’s Hospital-San Diego, which has a Gender Management Clinic to treat children with gender dysphoria and other related issues.

“In that moment, he was in crisis,” she recalled. He was admitted into the hospital’s youth psychiatry unit for a 72-hour suicide hold, she said.

But while at Rady Children’s, hospital employees kept referring to Kyler as a girl, and “he went into a spiral,” his mother said in a phone interview.

“He was frantic,” she said. “They were making him worse. They were completely traumatizing him.”

On Monday, Prescott brought a civil lawsuit against the hospital in U.S. District Court in Southern California, claiming that during Kyler’s stay at the facility, medical personnel violated federal and state laws that protect against discrimination.

Prescott stressed that she is not blaming the hospital for her transgender son’s death. But she wants to hold it accountable to “make sure that doesn’t happen to any other kids.”

Rady Children’s officials said in a statement to The Washington Post that their “top priority is providing the absolute highest level of care to our patients and families. While it is the policy of Rady Children’s not to comment on pending legal matters, any allegations of wrongdoing, including discrimination, are investigated thoroughly and followed up on.”

The lawsuit comes at an important time for members of the transgender community, who have been fighting in U.S. courts for civil rights — namely the ability to use their desired public restrooms and locker rooms. One of Prescott’s attorneys, Alison Pennington of the Transgender Law Center, told NBC News that the civil suit may be the first time a case involving a transgender child has claimed sex-based discrimination under the Affordable Care Act.

“When my son was in despair, I entrusted Rady Children’s Hospital with his safety and well-being,” Prescott said. “Hospitals are supposed to be safe places that help people when they’re in need. Instead of recovering at the hospital, Kyler got worse because staff continued to traumatize him by repeatedly treating him as a girl and ignoring his serious health issues.

“It’s painful to speak out, but I want to make sure no other parent or child ever has to go through this again.”

Kyler was born a girl on July 7, 2000. At 10, he started dressing more masculine and making friends almost entirely with boys, according to court documents. “When he was twelve, due to increasing gender dysphoria, Kyler began engaging in self-harming behaviors,” according to the documents.

After Kyler’s 13th birthday, his mother said, he announced: “Mom, I’m not a girl; I'm a boy.”

“He was scared,” his mother said. “I think for almost all transgender youth, telling their parents is extremely difficult.”

“I told him, ‘You know what? I love you no matter what. Whatever we need to do, I will always support you.’ It doesn’t mean it wasn’t confusing to me or challenging to me. ... But once I wrapped my head around it, it became this wonderful, beautiful thing to see him blossom into the person he was meant to be.”

He cut his hair short. He bought boys’ clothes. And his mother helped him legally change his name and gender marker with the state of California.

The American Psychological Association describes transgender people as those whose gender identity — an “internal sense of being male, female or something else” — or gender expression is different from their biological sex.

The association’s Diagnostic and Statistical Manual of Mental Disorders (DSM-5) states that to be diagnosed with “gender dysphoria,” a person must express a mismatch between the gender he associates with and the one he was born with, and it must persist for at least six months. “This condition causes clinically significant distress or impairment in social, occupational, or other important areas of functioning,” it states.

As puberty hit, Kyler struggled more with gender dysphoria, his mother said.

Last year, after Kyler’s suicide, his mother discussed her son’s struggles in a televised interview with Caitlyn Jenner.

“He was a beautiful kid with a beautiful soul,” Prescott said on “I Am Cait.” “Kyler was truly an amazing, amazing kid. I was proud of him for working so hard to be his authentic self.”

It didn’t come easy.

Prescott said many people assume Kyler was bullied by other children. But that wasn’t really the case.

“Really, where he had the most problems was with adults not understanding,” she told Jenner. “People out in society that really didn’t understand that he needed them to use a male pronoun.”

On April 5, 2015, Prescott took Kyler to Rady Children’s for “suicidal ideation related to his gender dysphoria and to treat serious self-inflicted lacerations,” according to the civil lawsuit. Early the next morning, he was placed on a suicide hold in the Child and Adolescent Psychiatry Services unit, where Prescott told personnel that her transgender son should be treated as a boy.

Kyler’s legal name and gender change were further noted in his medical records, according to court documents.

“RCHSD staff assured Katharine that all staff would refer to Kyler with male gender pronouns and would otherwise treat him as a boy,” according to the documents.

However, the lawsuit claims, nurses and other staff members kept referring to Kyler with feminine pronouns. At one point, it claims, an employee said: “Honey, I would call you a ‘he,’ but you’re such a pretty girl.”

The lawsuit states that Kyler complained to his mother, who called the hospital “multiple times” to explain his distress; ultimately, the hospital blocked her phone number.

“Kyler was severely harmed by RCHSD staff’s repeated misgendering, as a result of RCHSD’s failure to respect and affirm his male gender and his gender dysphoria,” according to the filing. “Kyler’s distress was compounded by Katharine’s inability to advocate for or console her son as a result of RCHSD’s blocking Katharine’s phone calls.”

His therapist called the hospital, and a third of the way through his 72-hour hold, it was determined that he should be discharged due to “increasing severe distress related to the discrimination,” according to the documents.

Kyler killed himself six weeks later.

Diane Ehrensaft, mental health director at the Child and Adolescent Gender Center at University of California at San Francisco, said she has seen many cases in which transgender children were traumatized at hospitals.

“It’s not uncommon and, in fact, I would say it’s common practice for hospitals both not to be trained on the proper care of transgender youth or adults, and to make mistakes,” she said. “Sometimes it’s just from ignorance, not from malice. Unfortunately, it causes great harm, whether it’s done intentionally or unintentionally.”

Ehrensaft said that when people “misgender” them, it “pings” them, causing further damage.

“Particularly if you already have a child in stress who’s feeling suicidal, you’re going to make them feel more suicidal if you don’t mirror back to them who they’re trying to tell you they are,” she said. “The core of their distress may be that ‘I’m trying to tell everybody who I am, and nobody’s listening.’ ”

Not only is it psychologically damaging, Ehrensaft said, it’s also a form of discrimination.

Prescott’s attorneys argue that Rady Children’s violated anti-discrimination protections in federal and state laws, including President Obama’s Affordable Care Act; Prescott is seeking to recover damages as well as an injunction to force the hospital to implement policies and procedures to prevent discrimination against other transgender children.

“It’s really important that hospitals be able to treat whatever kids come to them, especially when kids are in crisis,” said Amy Whelan, senior staff attorney at the National Center for Lesbian Rights, which is representing Prescott with the Transgender Law Center and Foley & Lardner LLP. “It was clear Rady was unable to do that — which made Kyler worse, not better.”

Read more: