On Oct. 3, the ACLU will be back in the Supreme Court to argue Jennings v. Rodriguez, a case that will decide the fate of thousands of men and women who are languishing in immigration prisons across the country. At issue is the federal government’s practice of locking up immigrants for years without the basic due process of a hearing to determine if their imprisonment is justified.

People fighting deportation can be detained indefinitely while they defend their rights to remain in the United States. This would include lawful permanent residents (or green card holders) who have lived in the U.S. nearly all of their lives; asylum seekers and survivors of torture; the parents of young children who are citizens; and even citizens who are wrongly classified as immigrants. Many go on to win their deportation cases, which means their detention was completely unnecessary. Even worse, prolonged detention causes many individuals to give up strong challenges to deportation — which they might have won — because they can’t endure the hardship of being locked up.

The ACLU won the Jennings case in the lower courts, with a 2015 federal appeals court decision in the Ninth Circuit requiring bond hearings to assess danger and flight risk for immigrants when detention exceeds six months. The Second Circuit Court of Appeals reached a similar ruling. But the federal government appealed the case to the Supreme Court. An eight-member court first heard the case in November 2016; the court did not issue a ruling, and ordered re-argument for this October before the full, nine-member court.

The Trump administration has pledged to expand immigration detention to record-breaking levels and lock up more people than ever as part of its crackdown on immigrant communities. If upheld by the Supreme Court, the Jennings decision will ensure that immigrants caught up in the dragnet aren’t arbitrarily locked up for years without due process.

Take the case of Mark, who was arrested in 2013 by U.S. Immigration and Customs Enforcement (ICE) in Orange County, California, as he was driving his son to daycare. Mark had arrived in the U.S. from South Korea at the age of six, and had been a green card holder since 1988. Nonetheless, ICE put Mark in mandatory detention based on a single conviction — marijuana possession with intent to sell —from almost 15 years earlier. When he learned the reason for his arrest, Mark was shocked: he had complied with his sentence so long ago and had not been in trouble with the law since.

By locking Mark up, the government left his wife Sarah alone to care for their newborn twins and 1-year-old son and to run their shipping business. Mark was unable to see his family for long periods, and even when they visited, he couldn’t hold his children. Finally, after six months of detention, he was given a Jennings hearing and ordered released on a $9,000 bond. Mark later had his marijuana conviction vacated, and his deportation case was terminated. “If it wasn’t for the [Jennings] bond,” he said, “I don’t know what would have transpired. I was about to give up and sign deportation papers.”

Locking people up like Mark for months and years without due process is unconstitutional and un-American. Nowhere else in our legal system do we allow the government to lock people up indefinitely without a hearing before a judge to determine if the person should be locked up in the first place. Prolonged detention has devastating impacts on families and communities: people lose their homes, jobs, and savings, and vulnerable children and the elderly are left without caretakers. Long-term detention also wastes taxpayer dollars. An estimated average of 34,000 men and women are locked up in immigration prisons on any given day, or about 400,000 people a year, at a cost of approximately $2 billion a year to U.S. taxpayers. This explosion in immigration detention directly benefits the private prison industry whose facilities hold more than 70 percent of immigration detainees.

There are other options. Research and practice show that alternatives to detention — such as calls to remind defendants about court dates — are highly effective at ensuring that people show up for court and are far less costly. Holding a bond hearing does not undermine public safety. The Jennings ruling only requires that a hearing be held; it does not require that anyone be released from custody. In a case where there is a risk to public safety, the judge can simply refuse to release that person.

The Ninth Circuit got it right: A person who has been locked up for six months or longer while fighting a deportation case should get a hearing where the government bears the burden to show that continued imprisonment is justified. The Constitution protects all people — citizen and immigrant alike.