(Reuters) - A U.S. appeals court on Friday dealt a setback to the Trump administration attempt to bar almost all asylum applications at the U.S.-Mexico border, but stopped short of applying its decision nationwide.

FILE PHOTO: Central American migrants, returned from the U.S. to Nuevo Laredo in Mexico under the Migrant Protection Protocol (MPP) to wait for their court hearing for asylum seekers, are seen arriving to Monterrey, Mexico July 31, 2019. REUTERS/Daniel Becerri

While ruling against a provision of President Donald Trump’s hard-line anti-immigration policy, the 9th U.S. Circuit Court of Appeals said the decision would only apply to the nine Western states that make up the 9th Circuit. Only two of those nine, California and Arizona, are on the border with Mexico.

That left open the possibility that the sweeping ban, which requires most asylum-seekers to first seek safe haven in a third country, could be applied in the other border states of Texas and New Mexico.

The appellate court ruling came on the same day that California and other states, as well as a coalition of advocacy groups, filed lawsuits to stop a separate Trump initiative to reduce legal immigration by denying visas to poor migrants.

The flurry of legal activity is attempting to halt major policy moves by the Trump administration to crack down on immigration, an issue central to the Republican president’s political fortunes.

One of Trump’s main objectives has been to reduce the number of asylum claims by mostly Central American migrants who have crossed the U.S.-Mexico border in record numbers during his presidency.

His July 15 rule promptly drew legal challenges including from a coalition of groups led by the American Civil Liberties Union.

On July 24, U.S. District Judge Jon Tigar in San Francisco issued a preliminary injunction blocking it from taking affect.

The government appealed Tigar’s decision. In Friday’s ruling a three-judge panel found the Trump administration had failed to comply with portions of the law that governs rule-making.

“The court properly refused to let the new asylum ban go into effect, though currently limited to the Ninth Circuit. We will continue fighting to end the ban entirely,” ACLU attorney Lee Gelernt said in a statement.

The White House said in a statement that it “strongly” disagreed with the decision and hoped the injunction would be lifted on appeal.

“While the injunction remains overbroad - even as modified by the Ninth Circuit’s decision - we will now be able to apply the rule at issue to curb asylum abuse outside of the Ninth Circuit,” the statement said.

The ruling could provide an incentive for more asylum-seekers to cross the U.S. border in California and Arizona, as opposed to Texas and New Mexico.

The Trump administration has said it needs to curtail asylum cases because the vast majority are ultimately found to be without merit.

Opponents counter that it is unrealistic to expect people fleeing persecution to seek asylum in ill-equipped countries they may have traveled through on their way to the United States, such as Mexico or Guatemala.

STATES CHALLENGE TRUMP

In Friday’s other legal development, four states led by California plus the District of Columbia sued the Trump administration over its attempt to curtail legal immigration.

At the same time, a coalition of immigrant advocacy groups filed a similar suit. Both were filed in U.S. District Court in San Francisco.

The two new cases mirrored two legal challenges filed earlier this week by 13 states and two local California jurisdictions.

All are challenging a Trump administration rule that would deny or revoke visas for legal immigrants who might become a public charge because they fail to make enough money or because they receive or might in the future receive public assistance such as welfare, food stamps or public housing.

Some experts say the rule could cut legal immigration in half.

California Governor Gavin Newsom and Attorney General Xavier Becerra announced the lawsuit in a news conference, calling it illegal in part for violating the equal protection guarantee of the Fifth Amendment of the U.S. Constitution by disproportionately blocking nonwhite and non-European immigrants.

“As a son of immigrants, I will tell you this Trump rule, the way it targets and attacks immigrants, it is personal,” Becerra said. “As the attorney general of the state of California, I will tell you that this Trump rule is unlawful.”

The advocacy groups in their complaint said the Trump administration was “determined to prevent immigrants of color from coming to and remaining in the United States.”