A federal appeals court on Tuesday upheld a controversial state law requiring nearly all Texas facilities that perform abortions to operate like hospital-style surgical centers.

If the ruling stands, abortion providers say another dozen could close in the next few weeks. They say that would leave nearly a million women at least 150 miles from the nearest abortion provider.

Since the law first passed in 2013, about half the state's 40 clinics have shut down.

Providers and women's rights groups have vowed to appeal to the Supreme Court, arguing that the restrictions pose an undue burden on women's constitutional right to abortions.

The 5th U.S. Circuit Court of Appeals decision reverses a lower court ruling, and allows most of a law passed in 2013 to finally take effect. In addition to the requirement calling for clinics to uphold surgical standards, the court upheld a provision that requires doctors who perform abortions to have admitting privileges at a local hospital.

"It is a resounding win, and it applies to virtually the entire state of Texas, except one small carve-out," says Joe Pojman, who heads the Texas Alliance for Life.

The court ruled that in most cases, the provision didn't put an unconstitutional burden on women seeking abortions — making only one exception for a remote clinic in McAllen, near the border with Mexico. But that clinic's owner says the exception is so narrow, she's not sure it will be able to stay open.

In another part of the state, the court ruled that it's fine if a clinic in El Paso closes, since women there can get the procedure just across the state line in New Mexico.

"We would hope that New Mexico would increase its safety standards, and do what Texas has done. But it's pretty silly to say that women in Texas don't have access to abortion, even in El Paso, when they're so readily available in the state of New Mexico," Pojman says.

Critics of the ruling disagree.

"The ruling is absurd because the court is essentially saying if you want to have an abortion you have to travel to other states that don't have these laws," says Stephanie Toti, a lawyer with the Center for Reproductive Rights, which challenged the Texas law. "The court is essentially recognizing that these laws don't provide any health or safety benefit. The point is to try to make Texas an abortion free state."

The impact of the law, even before this ruling, has been devastating, says Amy Hagstrom Miller who heads Whole Woman's Health, which owns several clinics in Texas and is a plaintiff in the case.

"So many women and families don't know where to go, don't know what the law is, think abortion is illegal, are confused about the status of their rights throughout the state," Miller says.

There could also be some confusion in the legal world. The very same 5th Circuit appeals court ruled differently on a similar law in Mississippi, saying that women there had a constitutional right to an abortion in the state where they live.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.