Five states and two religiously oriented health care groups say new federal regulations covering transgender patients could force doctors to perform procedures that violate their religious beliefs or medical judgment.

Led by Ken Paxton, the attorney general of Texas, they've gone to the same judge who earlier this week blocked the Obama administration from taking any action that would force public schools to allow students the choice of bathrooms that match their gender identity.

The issue in the prominent transgender cases now in court — including lawsuits over North Carolina's bathroom law — is the same: does federal law that bars sex discrimination apply to distinctions based on gender identity or only based on the sex assigned at birth?

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Related: Federal Judge Blocks Federal Action on Transgender Students' Bathroom Access

The latest lawsuit was filed Tuesday in Fort Worth by Texas, Kansas, Kentucky, Nebraska, Wisconsin, joined by the Christian Medical and Dental Association and the Franciscan Alliance.

A sign protesting a North Carolina law restricting transgender bathroom access is seen in the bathroom stalls at a hotel in Durham, North Carolina on May 3, 2016. JONATHAN DRAKE / Reuters

They challenge a recent federal interpretation of a provision in the Affordable Care Act that bars discrimination on the basis of sex, which the new rule defines as a person's "internal sense of gender, which may be male, female, neither, or a combination of male and female."

According to the lawsuit, "the regulation forces doctors to perform controversial and sometimes harmful medical procedures ostensibly designed to permanently change an individual's sex.” That's so, it says, even when they are contrary to the doctor's medical judgment or religious beliefs.

Related: Transgender Bathroom Access to Extend to All Federal Buildings

For example, the suit says, a doctor performing mastectomies to treat breast cancer would be barred from declining to perform the same surgery for sex reassignment.

Mara Keisling, executive director of the National Center for Transgender Equality, said the rule is intended to prevent discrimination against transgender people in getting access to all kinds of health care.

"The ACA rule does not mandate what kind of care doctors can and cannot give. It bans discrimination. It’s there to make sure that transgender people can get the treatment we need without facing harassment — or worse."

It applies, she said, not only to transition-related care "but also to getting care for other health issues, from colds to cancer. It simply requires that medical decisions be made based on medicine, not prejudice."