HOUSTON -- A federal appeals court on Friday cleared the way for the U.S. government to forbid Central American immigrants from seeking asylum at the two busiest stretches of the southern border in a partial legal victory for the Trump administration.

The ruling from the 9th U.S. Circuit Court of Appeals allows President Donald Trump to enforce the policy in New Mexico and Texas, rejecting asylum seekers who cross from Mexico into either state. Under Friday's ruling, U.S. District Judge Jon Tigar's July 24 order stopping the policy would apply only in California and Arizona, which are covered by the 9th Circuit.

The two busiest areas for unauthorized border crossings are in South Texas' Rio Grande Valley and the region around El Paso, Texas, which includes New Mexico. Nearly 50,000 people in July crossed the U.S. border without permission in those two regions, according to the U.S. Border Patrol.

The policy would deny asylum to anyone who passes through another country on the way to the U.S. without seeking protection there. Most crossing the southern border are Central Americans fleeing violence and poverty, who would largely be ineligible. The policy would also apply to people from Africa, Asia, and South America who come to the southern border to request asylum.

If the policy is implemented, ineligible migrants who cross in New Mexico and Texas could be detained and more quickly deported. The U.S. Department of Homeland Security did not immediately respond to a request for comment Friday.

Under American law, people can request asylum when they arrive in the U.S. regardless of how they enter. The law makes an exception for those who have come through a country considered to be "safe" pursuant to an agreement between the U.S. and that country.

Canada and the U.S. have a "safe third country" agreement. But the U.S. doesn't have one with Mexico or countries in Central America. The Trump administration has tried to sign one with Guatemala, but the country's incoming president said this week that Guatemala would not be able to uphold a tentative deal reached by his predecessor.

The U.S. government is already turning away many asylum seekers at the southern border.

About 30,000 people have been returned to Mexico to await asylum hearings under the government's Migrant Protection Protocols program. Tens of thousands of others are waiting in shelters and camps to present themselves to U.S. border agents at official ports of entry that have strict daily limits on asylum seekers.

Mexico's asylum system is itself overwhelmed, and there are widespread reports of migrants being attacked and extorted . Border cities across from New Mexico and Texas include Juarez, Nuevo Laredo, and Reynosa, all of which are well-known for their violence and gang presence.

Tigar had ruled the policy could expose migrants to violence and abuse, deny their rights under international law, and return them to countries they were fleeing.

The appeals court ruled that Tigar's order hadn't considered whether a nationwide order was necessary and that there wasn't enough evidence presented yet to conclude that it was. The court instructed Tigar to "further develop the record in support of a preliminary injunction" extending nationwide.

Judges Mark Bennett and Milan Smith voted to limit Tigar's order. Judge A. Wallace Tashima dissented.

Tigar is a nominee of former President Barack Obama. Trump previously derided Tigar as an "Obama judge" after Tigar ruled against another set of asylum restrictions last year. That comment led to an unusual rebuke from Chief Justice John Roberts, who said the judiciary did not have "Obama judges or Clinton judges."

Trump nominated Bennett, while Smith was nominated by former President George W. Bush. Tashima was nominated by former President Bill Clinton.

The American Civil Liberties Union and other legal groups sued the Trump administration after it announced the restrictions last month.

"We will continue fighting to end the ban entirely and permanently," said Lee Gelernt, a lawyer for the ACLU.

The Department of Justice declined to comment.

------

This version corrects the spelling of the dissenting judge's name to Tashima.