WASHINGTON – The liberal Supreme Court justices Wednesday seemed skeptical of U.S. policies that allowed certain immigrants to be detained for years without trial, potentially signaling a ruling that would impede President-elect Donald Trump’s mass deportation plan.

The case, Jennings V. Rodriguez, concerns how long certain immigrants awaiting deportation proceedings can be detained without receiving a bond hearing – a trial determining if they can be released temporarily on bond because they are unlikely to flee or commit a crime. The case concerns immigrants who are either here legally and have committed certain types of crimes or who sought asylum at the border by claiming reasonable fear of persecution in their home country.

Most of these immigrants are eventually allowed to remain in the US, but government data indicates they remain in detention centers for 13 months await a decision. The lead plaintiff in the class action suit, a dental assistant named Alejandro Rodriguez who had lived in the U.S. since infancy, sued after spending three years in detention.

The 9th U.S. Circuit Court of Appeals sided with the plaintiffs in August, mandating detainees receive a bond trial every six months. There, the government must prove they pose a risk of flight or recidivism. Alabama Republican Sen. Jeff Sessions, who will be in charge of executing Trump’s immigration plan if he is confirmed as attorney general, decried it as a “radical” decision that “will endanger thousands of innocent American lives.”

If officials are forced to prove immigrants are a flight or recidivism risk in order to detain them for over six months, it would likely slow Trump’s plan to deport up to 3 million immigrants.

U.S. Solicitor General Ian Gershengorn argued that the appeals court had undermined a system established by Congress to balance flight risk and concerns about crime with an immigrant’s right to due process under the 14th Amendment. Justice Sonia Sotomayor, however, questioned his reasoning repeatedly.

“If these are people who have been here for decades, let’s say, don’t you think due process would require some periodic review to ensure that these people are properly being held?” Sotomayor said.

U.S. regulations dictate that the government should not consider the amount of time someone has been detained when they consider giving them a bond trial, but Sotomayor argued that’s what a judge does in every other bond case. After a certain length of time, Sotomayor said, detention becomes unreasonable.

When Gershengorn argued that detention only becomes unconstitutional if it’s clear the government is incarcerating an immigrant for a purpose other than eventually deporting him, Justice Elena Kegan said the government can’t drag the detention process indefinitely, regardless of its intentions.

“It doesn’t really matter what kind of evidence you have — three years is too long,” Kagan said, apparently referencing the length of time Rodriguez, the plaintiff, was detained.

Gershengorn continually referenced the 2003 case Demore V. Kim, in which justices upheld the government’s decision to detain immigrants without a bond trial. However, the Bush administration had provided highly inaccurate data at the time, saying immigrants awaiting deportation hearings were detained for an average of four, rather than the now accurate 13, months.

“If you put Demore aside, I think we would all look at our precedent and we would say you can’t just lock people up without any finding of dangerousness, without any finding of flight risk,” Kagan said.

When the plaintiff’s attorney, Ahilan Arulanantham, argued that the justices could set general guidelines for hearings if they deemed the 9th Circuit’s six-month rule arbitrary or unyielding, Chief Justice John Roberts said that setting policy was beyond the scope of the Supreme Court. He sharply questioned why Arulanantham would ask the court to rule the continued detentions unconstitutional – rather than simply against congressional statutes – when the lower court had not done so.

“The court below didn’t reach your constitutional argument, right?” Roberts said.

Arulanantham responded: “It did not, your honor,”

“Well, do you expect us to do it in the first instance?” Roberts asked.

Conservative Justice Samuel Alito was the most critical in his comments, telling Arulanantham repeatedly, “I’m not sure how far you can get with argument.”

With one Supreme Court seat still vacant, a 4-4 split would uphold the appeals court ruling.