Sept. 3 (UPI) -- President Donald Trump's use of a 227-year-old wartime law to rapidly deport Venezuelan migrants is unlawful, a divided appeals court ruled Tuesday, finding there is no invasion of gang members from the Caribbean nation to justify invoking the Alien Enemies Act of 1798.

The Fifth U.S. Circuit Court of Appeals ruled 2-1 Tuesday, issuing a temporary injunction against the Trump administration from using the AEA to deport Venezuelans accused of being members of Tren de Aragua.

"We determined TdA was engaged in either an invasion or a predatory incursion, the findings in the Proclamation that such actions were being directed at least in part by the foreign Maduro regime would satisfy the requirement that those actions be by a government or nation. We held instead that TdA was not the kind of organized force or engaged in the kind of actions necessary to constitute an invasion or predatory incursion," the three-judge panel said in the ruling.

Trump, who campaigned on conducting mass deportations, often with the use of incendiary rhetoric and misinformation, invoked the AEA in March, which allows the federal government to rapidly deport foreign nationals in the event of an invasion.