LUBBOCK, Texas (AP) — A federal judge in Texas temporarily blocked the federal government from enforcing a legal interpretation that would require hospitals in the state to provide abortion services if the health or life of the mother is at risk.

Texas sued Department of Health and Human Services and Secretary Xavier Becerra last month, arguing that the Emergency Medical Treatment and Labor Act, a federal law commonly referred to as EMTALA, doesn’t require doctors to provide abortions if doing so would violate a state law.

In a ruling Tuesday, U.S. District Judge James Wesley Hendrix temporarily blocked the government from enforcing the guidance in Texas, saying the guidance force physicians to place the health of the pregnant person over that of the fetus or embryo even though EMTALA “is silent as to abortion.” He also said the guidance couldn’t be enforced against members of two national anti-abortion medical organizations, the American Association of Pro-Life Obstetricians and Gynecologists and the Christian Medical and Dental Associations.

Performing an abortion creates an “emergency medical condition” in the fetus or embryo, the judge wrote.

“Since the statute is silent on the question, the Guidance cannot answer how doctors should weigh risks to both a mother and her unborn child,” the judge’s order said. “Nor can it, in doing so, create a conflict with state law where one does not exist. The Guidance was thus unauthorized.”

The Department of Health and Human Services said it was reviewing the legal decision to determine its next steps.

A similar case is playing out in Idaho, where a federal judge suggested Monday that the state’s abortion ban might violate EMTALA. A ruling in that case is expected later Wednesday.

White House Press Secretary Karine Jean-Pierre called the Texas decision, “a blow to Texans,” saying pregnant women in Texas may now be denied appropriate treatment for conditions such as dangerously high blood pressure or severe bleeding.

“It’s wrong, it’s backwards, and women may die as a result. The fight is not over,” Jean-Pierre said in a prepared statement. “The President will continue to push to require hospitals to provide life-saving and health-preserving reproductive care.”

The Department of Health and Human Services issued the guidance in July, weeks after the U.S. Supreme Court ruled that abortion is not a constitutional right.

The agency cited EMTALA requirements on medical facilities to determine whether a person seeking treatment might be in labor or whether they face an emergency health situation — or one that could develop into an emergency — and to provide stabilizing treatment.

Texas argued that the EMTALA guidelines also violated the Religious Freedom Restoration Act, which says some laws must be narrowly tailored to serve a compelling government interest if they affect individuals’ religious freedoms.

In Texas, a ban on abortion at all points of a pregnancy is scheduled to take effect Thursday. It has narrow exceptions for saving the life of the unborn child or woman, preventing a serious health condition from being aggravated or caused by the pregnancy, or removing an ectopic pregnancy.

Texas clinics have already stopped offering nearly all types of abortion because of uncertainty over whether the state’s 1925 ban can be enforced. The state also has a ban on abortions after embryonic cardiac activity can be detected, which is generally about six weeks into a pregnancy and often before a woman realizes she’s pregnant.

In his ruling, Hendrix said the Department of Health and Human Services’ guidance went beyond the bounds of EMTALA by allowing some abortions before they threaten the life of a pregnant person.

“The Guidance itself cites an ‘incomplete medical abortion’ as a potential emergency medical condition that may require abortion,” Hendrix noted. “Since the Guidance permits a physician to immediately complete a medical abortion — regardless of whether the unborn child is still alive and before it presents a threat to the life of the mother — it goes beyond Texas’s law.”

Even in cases where the pregnancy does threaten the life of the mother, Texas law generally requires physicians to choose procedures that maximize the chances that the fetus will survive, the judge wrote.

“The Guidance gives Texas hospitals and physicians license — much more, requires them — to violate Texas abortion laws if their medical judgment says an abortion is required to stabilize the patient in a situation prohibited by Texas law,” Hendrix said.

Like Texas, Republican-led Idaho’s abortion ban is set to take effect on Thursday. But the Idaho law has a few key differences: It starts after cardiac activity is detected, it includes ectopic pregnancies, and it has no exception for conditions that could seriously damage the mother’s health.

The Idaho law effectively makes it a felony to perform any abortion in “clinically diagnosable pregnancies.” Physicians can defend themselves in court by arguing that an abortion they provided was necessary to prevent the pregnant woman’s death or was done in a case of rape or incest and the woman reported the crime to law enforcement and gave a copy of the report to the physician. Law enforcement reports are sealed in Idaho during investigations and can take months or longer to obtain.

The U.S. Department of Justice sued Idaho earlier this month, saying its abortion ban violates EMTALA.