Jionni Conforti, in his home in Totowa, N.J., on Thursday. (Julio Cortez/AP)

Jionni Conforti was on the verge of an operation that would transform him physically and, he hoped, psychologically.

The 33-year-old transgender man had already undergone one major surgery to help align his gender identity with his physical appearance, having both breasts removed in 2014 in what his doctors called a “medically necessary” double mastectomy. He was also receiving hormone therapy as part of his treatment for gender dysphoria — a condition the American Psychiatric Association describes as a conflict between a person’s physical or assigned gender and the gender with which the person identifies.

The next step in his transition from female to male, Conforti’s doctors recommended, was a total hysterectomy, the surgical removal of his uterus and cervix. That operation, too, was deemed medically necessary — not just as a part of his transition, his doctors told him, but because his hormone therapy put him at risk of developing reproductive cancers.

In June 2015, after consulting with physicians, Conforti was set to undergo the hysterectomy at St. Joseph’s Hospital in Wayne, N.J. But on the day of a key appointment with the surgeon who had agreed to operate on him, the hospital pulled the plug, court records show.

Because St. Joseph’s was a Catholic facility and the surgery was part of a “gender reassignment,” hospital officials allegedly told him, Conforti would have to go elsewhere.

Now, Conforti is accusing the hospital of discrimination. In a complaint filed Thursday in federal court in New Jersey, Conforti alleges St. Joseph’s violated New Jersey’s anti-discrimination law as well as provisions in the Affordable Care Act prohibiting discrimination on the basis of sex when it refused to perform the hysterectomy.

Lambda Legal, the organization representing Conforti in the case, described the operation as a “routine” and said the hospital was not entitled to “decide who their patients are.”

“Denying care to someone at their time of need because of their sex or gender identity is not only dangerous and humiliating, it’s against the law,” attorney Omar Gonzalez-Pagan said in a statement. “These health care providers must comply with federal and state anti-discrimination laws so that the health of LGBT people who walk through their doors is not endangered.”

In a brief statement Thursday, St. Joseph’s Regional Medical Center said it is “a leading Catholic healthcare institution serving one of the most diverse and underserved populations in New Jersey” and that it follows the guidelines for Catholic hospitals laid out by the U.S. Conference of Catholic Bishops.

Conforti’s case comes amid heated nationwide debate over transgender rights. The Obama administration has sought to enact policies that protect people from discrimination based on gender identity, and has sought to require public schools to allow students to use the bathroom corresponding with their gender identity, rather than their biological sex.

Just last week, a group of Catholic businesses filed suit in federal court in North Dakota seeking to overturn a rule in the Affordable Care Act they argue will force Catholic hospitals like St. Joseph’s to perform gender reassignment procedures that clash with their faith. Days after they filed their complaint, a federal judge in another case in Texas issued a temporary injunction blocking the regulation, which also bars discrimination on the basis of “termination of pregnancy.”

Conforti’s lawsuit says he was diagnosed with gender dysphoria in 2014, after battling depression and anxiety for years as he grappled with his gender identity. Following the diagnosis, the suit says, Conforti received doctor-prescribed hormone therapy, a double mastectomy and other medical treatments.

According to the complaint, Conforti’s doctor advocated a hysterectomy, writing in a referral letter that the operation would be “highly beneficial” for his well-being. His therapist also supported his decision, saying a “full hysterectomy has been discussed at length and is currently recommended to complete full transition from female to male,” according to the complaint.

After talking with several gynecological surgeons in the area, the lawsuit says, Conforti emailed a physician at St. Joseph’s, who told him he would “be capable of performing the surgery and happy to do so.”

Out of an abundance of caution, Conforti said he reached out to hospital administrators to make sure the operation still had the hospital’s green light. Among them was the head nurse of surgery, who assured him he would not face any problems relating to the surgery because of his gender dysphoria, according to the complaint.

But in a June 16, 2015, consultation, Conforti’s surgeon allegedly told him the hysterectomy had to be called off because it was part of his gender reassignment. In an email later that day, the suit says, Father Martin D. Rooney said:

This is to follow up to your email inquiring about scheduling a total hysterectomy here at St. Joseph’s to remove all female parts based on the medical necessity for Gender Reassignment. This is to inform you that as a Catholic Hospital we would not be able to allow your surgeon to schedule this surgery here at St. Joseph’s.

Conforti said the decision shocked and humiliated him. In a statement issued through his attorneys, Conforti described St. Joseph’s as his “neighborhood hospital” and said he and his family have received treatment there. His complaint accuses the hospital of denying him treatment because of his “sex, nonconformity with sex stereotypes, gender identity, and transgender status.” He is seeking monetary damages and an order requiring the hospital to provide patients gender dysphoria-related health care.

It took several months, but Conforti found a hospital that performed the hysterectomy, he told the Associated Press. But the episode still left him emotionally scarred, he said.

“I felt completely disrespected,” Conforti said. “That’s not how any hospital should treat any person regardless of who they are. A hospital is a place where you should feel safe and taken care of. Instead, I felt like I was rejected.”

More from Morning Mix

A Florida mom put her 10-year-old on a timeout. Then came the gunshot, police say.

How some students got Obama to write for the Harvard Law Review

Hate crime charges filed after ‘reprehensible’ video shows attack on mentally ill man in Chicago