A federal appeals court ruled Tuesday that the Trump administration can make asylum seekers wait in Mexico for immigration court hearings while the policy is challenged in court, handing the president a major victory, even if it only proves temporary.

The 9th U.S. Circuit Court of Appeals — a frequent target of the president’s complaints — reversed a decision by a San Francisco judge that would have prevented asylum seekers from being returned to Mexico during the legal challenge.

The case must still be considered on its merits and could end up at the Supreme Court. But allowing the policy to remain in effect in the meantime lets the administration carry out an unprecedented change to U.S. asylum practices.