A transgender man is suing a Catholic hospital after he allegedly was denied medical services just minutes before he was scheduled to undergo surgery related to his gender transition.

As part of his treatment for gender dysphoria — a medical condition resulting from a conflict between one’s sex assigned at birth and one's gender identity — Oliver Knight, 29, was set to undergo a hysterectomy. But the procedure, which involves removal of the uterus, did not proceed as anticipated at the St. Joseph Hospital in Eureka, California, on Aug. 30, 2017.

“I arrived at the hospital and they checked me in and did the surgery prep, which was extremely uncomfortable and triggering,” Knight said in a statement shared Thursday by the American Civil Liberties Union. “I asked the nurse if I could have a blue gown, but she told me I was having a ‘female surgery’ and should wear the pink. I felt like a child all over again, sitting uncomfortably in a pink dress.”

Knight also claimed hospital staff repeatedly misgendered him, despite his medical records identifying him as a male. Then, “mere minutes” before his scheduled surgery — while he was hooked up to an IV — Knight’s surgeon, Dr. Deepak Stokes, informed him that hospital personnel would not allow the surgery to proceed because Knight did “not meet” the hospital’s “parameters for a sterilization,” the lawsuit states.

“Dr. Stokes confirmed to Mr. Knight that this meant the procedure was being denied because Mr. Knight is transgender,” the lawsuit says. “Mr. Knight was denied care provided to other hospital patients because he is a transgender man who sought the hysterectomy as treatment for his diagnosed gender dysphoria.”

The suit, which was filed Thursday in Humboldt County Superior Court, alleges the hospital discriminated against Knight due to his gender identity in violation of California’s Unruh Civil Rights Act.

“It seems the hospital does not understand how it feels to be treated inhumanely just because your body parts do not match your soul,” Knight stated. “This surgery was important — it was meant to balance my hormones. The delay disrupted my life. I felt like the hospital’s bigotry had set me back years.”

Knight said he hopes his lawsuit will help spare other transgender people from similar experiences when seeking health care.

“I didn’t expect discrimination from a hospital,” he added. “The sting from the rejection remains, but I hope my story lets others know that this is unacceptable.”

Elizabeth Gill, a senior staff attorney at the ACLU’s Northern California branch, is representing Knight. She said St. Joseph Hospital — which is part of Providence St. Joseph Health Network, a Catholic nonprofit that operates more than 50 hospitals with 25,000 physicians nationwide — claimed that performing a hysterectomy on Knight, a transgender man, would have conflicted with the hospital’s Catholic mission.

“The hospital regularly does hysterectomies,” Gill said. “In fact, Oliver’s surgeon has done hysterectomies at the hospital, which is why he and Oliver did not realize there was a possibility of it being canceled.”

Gill also noted that the U.S. Catholic Conference of Bishops, which outlines health care guidelines for hospitals within the Providence St. Joseph Health Network, has made its stance on health care rights for LGBTQ individuals “clear on multiple occasions.” In a joint letter to Congress dated March 20, the chairmen of three committees of the Bishop’s Conference summarized their reasons for opposing the Equality Act, a federal bill recently reintroduced in Congress that would protect against discrimination related to sexual orientation and gender identity. One of their main reasons is that they believe the act will “retract religious freedom.”

Yet, Gill said that St. Joseph Hospital is “open to the public, is publicly funded and is therefore subject to the requirements of nondiscrimination under California law.”

St. Joseph Hospital, for its part, said it is still investigating the incident.

“At St. Joseph Health, we believe health care is a basic human right and that every individual seeking care should always be treated with compassion and respect,” Christian Hill, a hospital spokesperson, wrote in an email to NBC News. “We have not had a chance to review the facts of the case, but take these allegations very seriously. We are committing our full attention to investigating this matter.”

In addition to working with Oliver Knight, Gill said the ACLU Foundations of California and the National Health Law Program are partnering on the All Care Everywhere campaign to ensure all Californians have access to needed health care. The campaign will include a collection of stories from those who were denied medical services because of their sexual orientation or gender identity in an effort to bring awareness to religious-based restrictions in health care.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM.