Indefinitely detained immigrants facing possible deportation lost ground in their fight for the right to a bond hearing following a Supreme Court decision on Tuesday. Their sole remaining weapon is the U.S. Constitution.

The ruling by Justice Samuel Alito in Jennings v. Rodriguez reverses a decision that had required the government to give certain immigrants who had been detained for at least six months the right to ask an immigration judge for bond. The Supreme Court rejected that interpretation of the immigration law and sent the case back to the Ninth Circuit to decide for the first time whether prolonged detention without a bond hearing violates the Constitution.

The decision is a huge setback for thousands of immigrants who are detained for months—and even years—without any right to go in front of an independent immigration judge and ask for bond, and for their advocates who have been working for more than a decade to challenge the law.

In the short-term, Immigration and Customs Enforcement (ICE) may be able to rearrest thousands of immigrants previously released on bond under the now-reversed Ninth Circuit decision. In the long-term, however, the Ninth Circuit may find that the Constitution provides the safeguard against indefinite detention that the Court found is not provided by current immigration law.

The Court’s decision in Jennings v. Rodriguez held that the immigration law, as written by Congress in 1996, did not permit bond hearing for certain immigrants held under mandatory detention during removal proceedings. Those subject to mandatory detention include asylum seekers who arrive at the border and ask for protection, as well any immigrant (including lawful permanent residents) who has been convicted of any one of a wide variety of crimes ranging from non-violent misdemeanor offenses to serious felonies.

In 2007, the ACLU filed a lawsuit in California on behalf of Alejandro Rodriguez, a long-time lawful permanent resident who had been detained for three years without a bond hearing while he fought the government’s attempt to deport him over a conviction for joyriding from when he was a teenager. Mr. Rodriguez’s case eventually became a class action lawsuit on behalf of all individuals held under mandatory detention.

In 2015, the Ninth Circuit ruled in Rodriguez v. Robbins that the government was required to provide bond hearings every six months, during which the government had to show that the immigrant was a danger to the community or a flight risk to justify continued detention. Since the Rodriguez decision, approximately 70 percent of immigrants subject to prolonged detention were found not to be a danger to the community or a flight risk and were released on bond.

But in rejecting the Ninth Circuit’s 2015 decision, the Court held by a 5-3 vote that there was no “reasonable interpretation” of the law which permitted bond hearings for immigrants and rejected the argument that any “implicit time limit on detention” could be read into the statute.

In a vigorous dissent, Justice Stephen Breyer argued that any “interpretation of the statute [which] would deny bail proceedings where detention is prolonged would likely mean that the statute violates the Constitution.” Joined by Justices Sotomayor and Ginsburg, he concluded that a reasonable reading of the statute would require bond hearings.

Now that the case returns to the Ninth Circuit, immigrants remain in limbo until a decision can be reached. Many will likely be detained for years pending a decision, even when they are clearly not a danger to the community or a flight risk.