MONTGOMERY, Ala. (AP) — A federal judge considering the constitutionality of a new Alabama abortion law said Monday he will hold a trial on whether the law creates a substantial obstacle to abortion by requiring abortion clinic doctors to have approval to admit patients to nearby hospitals.

U. District Judge Myron Thompson issued an 86-page opinion setting aside most of the issues raised by abortion clinics that challenged the law in court and by state officials named as defendants. The judge said the trial will address one issue raised by the clinics: whether the law violates the due process right of women seeking abortion by creating substantial obstacles.

“If the court finds that the statute was motivated by a purpose of protecting fetal life, then the statute had the unconstitutional purpose of creating a substantial obstacle,” the judge wrote.

The judge did not immediately set a date for the trial. Both sides took it as a positive sign that the judge is holding a trial, and neither said it was unusual.

“This fight is far from over, and it’s a fight we are determined to win,” said Staci Fox, chief executive of Planned Parenthood Southeast.

State Solicitor General Andrew Brasher, who has been defending the law, said he was pleased the judge tossed out three of the four issues that abortion clinics used to challenge the law. “We intend to vigorously defend the law against the remaining claim at trial,” he said.

The Legislature passed the law in 2013, but it has never taken effect because of the lawsuit filed by three of Alabama’s five abortion clinics. Thompson’s ruling came as the Alabama Legislature considers adding new abortion laws. On Tuesday, a Senate committee will consider three bills already approved by the House. One would ban abortions after a fetal heartbeat can be detected, which can happen at six or seven weeks into a pregnancy.

The American Civil Liberties Union, Planned Parenthood Southeast, which operates clinics in Birmingham and Mobile, and Reproductive Health Services, which runs a clinic in Montgomery, challenged the 2013 law. The clinics contend the law would force them to close because they use traveling physicians who can’t get approval from hospitals in the three cities to admit patients. They argue that the doctors can’t get approval because they don’t operate local medical practices or because the hospitals have religious affiliations.

The state attorney general’s office is arguing the doctors could try to get an exception from the hospitals or the clinics could hire other local doctors with admitting privileges. The attorney general’s office says the law is not about making abortions harder to get, but about protecting women’s health by making sure a doctor is available for follow-up care when problems occur.

Plaintiffs say the law has nothing to do with protecting women’s health. “Rather, it’s just another attempt by politicians prevent a woman from getting a safe and legal abortion, pure and simple,” ACLU attorney Alexa Kolbi-Molinas.

The judge wrote, “The court has concluded that there are genuine disputes of material fact regarding whether the clinics will close, the extent of the obstacle clinic closures would create, and the strength of the government’s justifications for the statute.”

On Thursday, the 5th U.S. Circuit Court of Appeals ruled in favor of a similar law in Texas. The appeals court said the law “on its face does not impose an undue burden on the life and health of a woman.”

Since the law went into effect, at least 19 abortion clinics, or about 44 percent of the state’s clinics, have closed.