A federal appeals court on Thursday upheld almost all of a Texas law that regulates abortion clinics in ways that critics say will close down abortion facilities throughout the state.

As it did earlier this year, a panel of the U.S. Court of Appeals for the Fifth Circuit upheld the statute in spite of a district court ruling finding that the law imposed an “undue burden” on women seeking abortions in Texas.