NEW YORK (Reuters) - A U.S. Appeals Court ruled on Thursday that immigrants ordered deported by U.S. authorities in a sped-up process have a right to take their case to a U.S. judge, giving them another avenue to challenge their removal from the United States.

The ruling allows immigrants subject to “expedited removal” to have their deportation reviewed in federal court, potentially frustrating efforts by the Trump administration to deport people quickly who have crossed the U.S.-Mexico border illegally.

“This decision reaffirms the Constitution’s foundational principle that individuals deprived of their liberty must have access to a federal court,” said Lee Gelernt, an attorney with the American Civil Liberties Union, who argued the appeal.

A spokesman for the Department of Justice declined to comment.U.S. immigration law allows authorities to use “expedited removals” to deport recent arrivals detained within 100 miles of the border. In 2016, the Department for Homeland Security carried out 141,000 expedited removals, according to the opinion.

If the migrant can show they have a credible fear of persecution in their home country, they can remain in the United States to seek asylum.

If authorities deny a claim of credible fear, the decision can be appealed to an immigration judge, who is not part of the judicial branch but an employee of the Department of Justice. Several courts have ruled that the law does not permit a challenge in federal courts.

The Appeals Court ruled that the U.S. Constitution guaranteed the asylum seeker could challenge their detention in a federal court, even if they were in the expedited removal process.

Stephen Vladeck, a professor at the University of Texas School of Law, said the ruling could slow the process of deportations, but the extent of the impact depended on the willingness of federal judges to stay removals.

The case stems from a lawsuit brought by Vijayakumar Thuraissigiam, who was detained near the San Ysidro port of entry in California in 2017.

U.S. asylum agents found he did not have a credible fear of being returned to his native Sri Lanka, where he is a member of the Tamil ethnic minority, according to the opinion. He said that in 2104 Sri Lankan government intelligence officers kidnapped him, beat him and threatened to kill him for his political activities.

An immigration judge upheld the credible fear finding, and in 2018, Thuraissigiam sued in federal court, alleging the process violated his constitutional rights.