In a decision that could be devastating for thousands who have been swept up by President Donald Trump's deportation dragnet and immensely profitable for the private prison industry, the Supreme Court ruled on Tuesday that immigrants—including those with permanent legal status—do not have the right to bond hearings and can be detained indefinitely.

"The government's practice of locking up immigrants indefinitely as they defend their right to remain in the U.S. is horrific."

—ACLUThe 5-3 ruling tosses out a 2015 lower court decision that stated immigrant detainees are entitled to a bond hearing every six months. The Obama administration appealed that ruling to the Supreme Court, and the Trump administration continued the case.

In a statement on Tuesday, the ACLU—which represented the lead plaintiffs in the case—said the Supreme Court's decision "will impact the lives of thousands of people, including lawful permanent residents, asylum seekers, and survivors of torture."

"The government’s practice of locking up immigrants indefinitely, without even a hearing to determine if they pose a risk of flight or danger to the community, as they defend their right to remain in the U.S. is horrific," the group added. "As the Trump administration detains immigrants at record-breaking levels, tearing apart families and entire communities, we will not stop fighting for immigrants' constitutional rights."

Others expressed similar alarm at a ruling that effectively enshrines what was already the common practice of prolonged detention under Trump and his predecessors—which the three dissenting Supreme Court justices argued is a clear violation of the constitutional right to due process.

The hellish internment camps of ICE and its private contractors have just been given the greenlight by our high court. https://t.co/y1BSa4r95W — Maud Newton (@maudnewton) February 27, 2018 [dystopia intensifies] https://t.co/yDUfJcmf5j — mark (@haircut_hippie) February 27, 2018 "Give me your tired, your poor, your huddled masses... so that we can lock them up in private detention centers indefinitely" https://t.co/DRUD6n4idX — Jorge Rivas (@thisisjorge) February 27, 2018

The case was originally brought in 2007 on behalf of Alejandro Rodriguez, a legal permanent resident who was convicted for joyriding and misdemeanor possession of a controlled substance.

Rodriguez was detained for three years without a bond hearing while the government attempted to deport him. He was finally released after the ACLU sued the government, and he ultimately won his immigration case.

Following the Supreme Court's ruling on Tuesday, the ACLU vowed to continue fighting in the lower courts.

"We have shown through this case that when immigrants get a fair hearing, judges often release them based on their individual circumstances," said ACLU attorney Ahilan Arulanantham. "We look forward to going back to the lower courts to show that these statutes, now interpreted by the Supreme Court to require detention without any hearing, violate the Due Process Clause."