The Fifth Circuit Federal Court of Appeals issued a historic ruling, deciding that President Donald Trump unlawfully used the Alien Enemies Act of 1798 in an attempt to deport Venezuelans accused of belonging to the “Tren de Aragua” gang.

By a 2-1 majority, a three-judge panel issued a preliminary injunction preventing the Trump administration from deporting a group of Venezuelans detained at the Blue Bonnet Center in Texas. Judge Leslie Southwick affirmed that the government failed to prove the Venezuelan gang engaged in “predatory aggression” on U.S. soil, a key condition for applying the law.

The law, dating back to the 18th century, grants the government exceptional powers to detain or deport nationals of hostile countries, but it is only activated during times of war or military invasion. Judge Irma Carrio Ramirez joined the majority decision, while Judge Andrew Oldham dissented.

The Trump administration is expected to seek reconsideration of the case before the full Fifth Circuit Court of Appeals, with potential escalation to the Supreme Court.

Attorney Lee Gelernt of the American Civil Liberties Union (ACLU) welcomed the ruling, stating it “puts an end to the use of an old military law in peacetime to justify immigration policies.” He also criticized the administration’s attempts to deport detainees after less than 24 hours’ notice, without allowing them to exercise their legal rights.