The US Supreme Court left the future of the US asylum system uncertain Wednesday night by allowing the Trump administration to proceed with its plan to bar most asylum seekers at the southern border while a lawsuit over the rule makes its way through the courts.

The justices’ decision effectively reinstated a Trump administration rule that prevents migrants from applying for asylum if they passed through another country other than their own before arriving in the US. That means that asylum seekers from any country but Mexico will now be ineligible for asylum if they show up at the southern border.

There are limited exceptions to the rule: those who apply for asylum in another country, but are rejected may bring their claims in the US. Victims of human trafficking and migrants who traveled through countries that are not parties to certain international human rights agreements are also exempt. But for the most part, it effectively closes the door on seeking asylum at the southern border.

The Court did not rule on whether the Trump rule is legal — just that the administration has the right to impose it temporarily.

A case about the legality of the rule itself is still making its way through the courts and the justices are expected to eventually weigh in. But in the meantime, the Trump administration is moving forward to use it to block most asylum seekers’ cases.

The decision outraged immigrant advocates: It represents a “massive reversal of American leadership to protect the most vulnerable people fleeing extreme violence and persecution from around the world,” Todd Schulte, president of the immigrant advocacy group FWD.us, said in a statement.

The Trump administration is trying to stop an influx of migrants seeking asylum

The rule, which was issued on July 16, is one of many recent Trump administration measures to curtail asylum in the US. It strips asylum eligibility from any foreign national who “enters, attempts to enter, or arrives in the United States across the southern land border ... after transiting through at least one country outside the alien’s country of citizenship, nationality, or last lawful habitual residence en route to the United States.”

It’s one of several measures the Trump administration has taken to make seeking asylum in the United States more difficult.

Migrants to the US are able to seek asylum either by presenting themselves to immigration agents at ports of entry or by doing so when they’re arrested while seeking to cross the border without authorization. Those who pass through Canada on their way to the border have been required since 2002 to claim asylum in Canada instead under an agreement between Canada and the US government.

But most migrants seeking asylum in the US pass through Mexico, coming from the Northern Triangle countries of Guatemala, Honduras, and El Salvador, where rampant crime, violence and corruption is driving tens of thousands to flee.

President Donald Trump has seen rising numbers of border arrests, generally considered a proxy for levels of unauthorized immigration, as a crisis worthy of declaring a national emergency in February. But while he characterizes the crisis as one of national security, immigrant advocates argue it is instead a matter of humanitarian concern.

To discourage unauthorized immigration, the Trump administration is also sending migrants who line up at a port of entry or who are arrested when trying to cross the southern border back to Mexico to await decisions on their asylum claims. Under the policy, which is known as “Remain in Mexico,” the US has returned more than 42,000 migrants to Mexico as of September 1, according to US Customs and Border Protection.

And the administration in July vastly expanded its power to quickly deport migrants who have recently arrived, without offering them the opportunity to pursue their asylum claims before an immigration judge.

The Supreme Court’s decision will likely deepen the crisis by pushing more asylum seekers into Mexico, which is ill-equipped to offer humanitarian aid. In Mexico, asylum seekers face dangers of kidnapping and sexual assault, overcrowded shelters, and slim employment prospects. They have difficulty finding lawyers, without which their asylum cases are almost surely doomed to fail.

This is only the beginning of the Supreme Court legal battle

A federal judge in San Francisco had blocked the rule nationwide after the American Civil Liberties Union, the Southern Poverty Law Center and the Center for Constitutional Rights filed a lawsuit challenging its legality.

The Supreme Court lifted that block Wednesday night, but has only reinstated the rule while the case goes through appeals in lower courts and has not yet decided whether it is legal.

Opponents of the rule have argued that it violates longstanding principles in the Refugee Act of 1980, in which the US codified its international human rights obligations as a party to the 1951 United National Refugee Convention.

The Refugee Act says that any noncitizen in the US can apply for asylum “whether or not at a designated port of arrival” and “irrespective of [their immigration] status.” The only exceptions are for those who were “firmly resettled” in another country before they arrived in the US or if they passed through another country with which the US had a “Safe Third Country” agreement. A Safe Third Country agreement is a bilateral treaty under which one country can reject and return an asylum seeker to another safe country.

The US currently only has a Safe Third Country Agreement with Canada. The Trump administration is working on negotiating such agreements with the Northern Triangle countries, as well as Mexico and Panama, but immigrant advocates say that those countries are far from safe for asylum seekers.

Opponents also argue that the Trump administration also skirted rulemaking requirements by issuing the rule without giving the public notice and the opportunity to submit comments on it.

So the justices may still choose to strike down the rule as unlawful. Lee Gelernt, an attorney for the American Civil Liberties Union who is challenging the policy, noted in a statement on Wednesday that the ruling is just a “temporary step.” “[W]e’re hopeful we’ll prevail at the end of the day,” he said. “The lives of thousands of families are at stake.”

In the meantime, however, the Trump administration seems to be charging ahead with its plan to expand the policy.

Department of Justice spokesperson Alexei Woltornist said that rule will help “bring order to the crisis at the southern border, close loopholes in our immigration system, and discourage frivolous [asylum] claims.” Acting US Citizenship and Immigration Services Director Ken Cuccinelli, meanwhile, signaled that the administration would soon issue further guidance on its implementation in a tweet.

(2/x) @realDonaldTrump’s administration uses every tool in the toolbox to try and solve the crisis at our southern border. @USCIS will commence implementing the asylum rule ASAP. — USCIS Acting Director Ken Cuccinelli (@USCISCuccinelli) September 11, 2019

All the possible outcomes for asylum seekers are dire

The rule will now go into effect across the entire southern border, affecting tens of thousands of asylum seekers.

Over 73,000 applied for asylum in fiscal year 2016, the most recent year for which statistics are available. That number has likely grown significantly over the past year.

Migrants who already have already applied for asylum should be unaffected, as the rule will not be applied retroactively, Jorge Luis Vasquez, an attorney at the immigrant advocacy group Latino Justice, said. But it’s not immediately clear how exactly immigration authorities will handle asylum seekers that continue to show up at the southern border.

Asylum seekers could be detained and make their case before an immigration judge, which would require proving that they had unsuccessfully sought asylum in another country prior to their arrival in the US. But that could create a huge backlog in the immigration courts because asylum seekers whose claims are denied will be more likely to appeal, Vasquez said.

Alternatively, asylum seekers could be turned away and instructed to apply for asylum in Mexico first under the “Remain in Mexico” policy.

But Mexico has neither the infrastructure to absorb tens of thousands of asylum seekers nor a legally robust asylum process. Vasquez said that individuals fleeing persecution in Central America — for example, on account of sexual orientation — are not likely to find protection in Mexico. The US regularly accepts asylum seekers from Mexico who have suffered from the same kinds of persecution, he added.

Aaron Reichlin-Melnick, a policy analyst for the American Immigration Council, said that the rule will particularly hurt tens of thousands of asylum seekers who have been subject to CBP’s practice of “metering” at ports of entry on the border.

Since at least 2016, CBP has been turning away migrants before they cross the international boundary between the US and Mexico if a port of entry is at capacity to process them, according to the DHS Office of Inspector General. Many of those migrants wait months for the opportunity to apply for asylum at a port of entry.

“Because those people chose to do what the Trump administration asked them to do, they will now be banned from applying for asylum,” Reichlin-Melnick said.