SAN DIEGO — In the latest twist on a key Trump administration immigration policy, a federal appeals court said it will prevent the government from making asylum-seekers wait in Mexico for U.S. court hearings starting next week unless the Supreme Court steps in sooner.

The 9th U.S. Circuit Court of Appeals in San Francisco said Wednesday that it would only block the “Remain in Mexico” policy in Arizona and California, the two border states under its authority.

President Donald Trump’s administration says it is asking the U.S. Supreme Court to intervene and had asked that the policy remain in effect until next week to give the high court time to decide. The Supreme Court has consistently ruled in the administration’s favor on questions of immigration and border enforcement.

The latest turn in the case comes after the 9th Circuit halted the policy along the entire southern border Friday but suspended its own order later that day after the government warned of dire consequences. “Remain in Mexico” is a crucial part of the Trump administration’s response to large numbers of asylum-seekers appearing at the border.

On Wednesday, the court ruled that the policy will no longer be in effect on Mexico’s border with California and Arizona starting March 12 unless the Supreme Court wades in sooner. It declined to extend its order to federal courts in the two other southern border states — New Mexico and Texas.

Judges William Fletcher and Richard Paez, both appointed by President Bill Clinton, said they acknowledged that nationwide orders applied to places outside a court’s jurisdiction are “a matter of intense and active controversy.”

They reaffirmed their view that the policy, known officially as “Migrant Protection Protocols,” is illegal under U.S. law to prevent sending people to countries where their lives or freedom would be threatened because of their race, religion, nationality, political beliefs or membership in a particular social group.

There is no question about “the extreme danger to asylum seekers who are returned to Mexico,” they wrote.

Judge Ferdinand Fernandez, an appointee of President George H.W. Bush, disagreed with blocking the policy at all.

Judy Rabinovitz, an attorney for the American Civil Liberties Union, which sued to end the policy, emphasized the majority’s opinion that it’s illegal.

“If the administration had any respect for the law or any sense of decency, it would end this program immediately,” she said. “We will continue working to permanently end this illegal and inhumane policy.”

The Justice Department declined to comment. In a court filing Tuesday, it warned of “massive disruption to the government’s immigration operations and sudden confusion for thousands of migrants about their ability to enter the United States. ”

About 60,000 asylum-seekers have been returned to Mexico to wait for their cases to wind through clogged U.S. immigration courts since the policy was introduced in January 2019 in San Diego and later expanded across the border.

Human Rights First, an advocacy group that opposes the policy, said it found more than 1,000 public reports of kidnappings, torture, rape and assaults of asylum-seekers returned to Mexico.