Texas must not become "a sanctuary state for abortions," the state's attorney general says.

Attorney General Ken Paxton made the comment in response to a lawsuit filed against the state. The legal challenge calls for all publicly funded health service providers to legally make abortions available to undocumented immigrants.

But Paxton says the argument doesn't hold up.

“No federal court has ever declared that unlawfully present aliens with no substantial ties to this country have a constitutional right to abortion on demand,” he said in an official statement, citing the case of a woman named “Doe.”

According to Paxton, Doe, a minor female who entered the U.S. illegally, asked for an abortion at a shelter funded by the U.S. Department of Health and Human Services in Brownsville, Texas. After being denied the procedure, she sued the state.

"If 'Doe' prevails in this case, the ruling will create a right to abortion for anyone on Earth who enters the U.S. illegally. And with that right, countless others undoubtedly would follow. Texas must not become a sanctuary state for abortions,” Paxton said.

The amicus brief is in response to a lawsuit brought by the American Civil Liberties Union (ACLU) in 2016 that called for the government to provide health services – abortion and contraception in particular – to the undocumented immigrants, the Houston Chronicle reported.

Paxton said the ACLU is trying to include "Doe" into its lawsuit in San Francisco in an attempt to get a favorable verdict.

The ACLU’s lawsuit claims the government already issues funds to organizations that provide health services to individuals, including the undocumented immigrants.

Six states have joined Paxton's amicus brief: Louisiana, Missouri, Nebraska, Ohio, Oklahoma and South Carolina.