A federal appeals court on Friday temporarily halted a Trump administration policy to make asylum seekers wait in Mexico while their cases wind through US immigration courts.

The same court decided to keep another major change on hold, one that denies asylum to anyone who enters the US illegally from Mexico.

A three-judge panel of the ninth US circuit court of appeals ruled on the two policies that are central to Donald Trump’s asylum crackdown, dealing the administration a major setback.

Later on Friday, however, the panel voted unanimously to suspend the order. It told the government to file written arguments by the end of Monday and for the plaintiffs to respond by the end of Tuesday.

The blow to the administration may prove temporary if the administration appeals to the supreme court, which has consistently sided with Trump on immigration and border security policies. Chad Wolf, the acting homeland security secretary, said he was working with the justice department to “expeditiously appeal this inexplicable decision”.

The question before the judges was whether to let the policies take effect during legal challenges.

The Trump administration has made asylum an increasingly remote possibility at a time when claims have soared. By 2017, the US had become the world’s top destination for people seeking asylum.

The Remain in Mexico measure took effect in January 2019 and nearly 60,000 people have been sent back to wait for hearings. The court declared the policy invalid, but acknowledged the ruling only applied to California and Arizona, the only border states in their jurisdiction.

The other measure with far-reaching consequences denies asylum to anyone who passes through another country on the way to the US border with Mexico without seeking protection there first. That policy took effect in September and is being challenged in a separate lawsuit.

Justice department lawyers asserted that Trump was within his rights to impose the policies without Congress’s approval and that they would help deter asylum claims that lack merit.

Opponents, including the American Civil Liberties Union, argued that the administration violated US law and obligations to international treaties by turning back people who will probably be persecuted because of their race, religion, nationality or political beliefs.

Judges William Fletcher and Richard Paez, who were both appointed by Bill Clinton, sharply questioned government attorneys on Remain in Mexico during arguments on 1 October. They voted to block it.

Judge Ferdinand Fernandez, an appointee of Ronald Reagan, dissented. Supporters of the Remain in Mexico policy note it has prevented asylum seekers from being released in the US with notices to appear in court, which they consider a major incentive for people to come.

Its expansion coincided with a sharp drop in border patrol arrests from a 13-year high in May, suggesting it may have had its intended effect. The homeland security department called it “an indispensable tool” in a 28 October report.

Opponents say it has exposed asylum seekers to extreme danger in violent Mexican border cities while they wait for US court hearings. Human Rights First, an advocacy group that has criticized the policy, said in January that there were more than 800 public reports of rape, kidnapping, torture and other violent crimes against asylum seekers who have been sent back to Mexico.

The policy was introduced at the border crossing in San Diego in January and initially focused on asylum seekers from Guatemala, Honduras and El Salvador.

It expanded to crossings in Calexico, California, and the Texas cities of El Paso, Eagle Pass, Laredo, Brownsville and included more people from Spanish-speaking countries.

The administration on 22 November began bussing asylum seekers who crossed the border in Arizona from Tucson to El Paso to be returned to Mexico from there, extending the policy across every major corridor for illegal border crossings.

In Laredo and Brownsville, asylum seekers appear for hearings in tents on US Customs and Border Protection property, connected by video to judges in other locations.

Mexicans are exempt, as are unaccompanied children.

The asylum ban on anyone who crosses the border illegally from Mexico also drew pointed questions from the judges during arguments. They asked whether the policy violated US law that says it doesn’t matter how people enter the country.

The US supreme court declined to lift a ruling blocking the ban following an extraordinary spat last year between Trump and Chief Justice John Roberts.

Trump denounced the judge who ruled against the ban as an “Obama judge”. Roberts said there was no such thing in a strongly worded statement defending judicial independence. Trump stood behind his comments.