A man who has already completed a lengthy sentence for sending money to terrorist groups continues to be held indefinitely behind bars, thanks to a provision of the PATRIOT Act.

Adham Amin Hassoun, a Palestinian, was detained in 2002 for outstaying his visa. He was subsequently charged and convicted in 2007 of directing financial aid to terrorist groups in places like Bosnia and Kosovo, disguising it as humanitarian aid for oppressed Muslims. He received much less media attention than his alleged co-conspirator Jose Padilla, a U.S. citizen accused of plotting a “dirty bomb” attack against the United States.

Hassoun was was supposed to be released in 2017 after serving his time. There was a problem, though: No country wanted to take him post-release. Hassoun was born in Lebanon, but he is not a citizen of the country. Israel and Jordan will not allow him back to the West Bank. Unlike Padilla, Hassoun isn’t an American citizen. He’s committed a deportable offense, but there’s nowhere to deport him to.

So rather than releasing him in the United States, the federal government is now using a section of the PATRIOT Act, passed after the September 11 attacks, to keep him detained, potentially forever.

Spencer Ackerman reports in The Daily Beast that the Department of Homeland Security has invoked Section 412 of the PATRIOT Act against lawyers seeking Hassoun’s release. Section 412 allows the government to detain a suspected terrorist before deportation if the attorney general determines that releasing the prisoner would threaten national security. This holding period is only supposed to last for six months—the section is even labelled “limitation on indefinite detention”—but it can be reviewed and renewed without limit.

Hassoun was not convicted of engaging in any terrorist acts. He was convicted of helping fund overseas organizations, and most of that money was sent prior to 9/11.

Furthermore, and much more importantly, he has served his time. This section of the PATRIOT Act was intended to let the authorities take terror suspects into custody and deport them. It was not intended to keep holding a convict after his sentence has been completed. Ackerman reports:

Attorneys for Hassoun, who were in federal court on Friday to argue for his freedom, are stunned at the invocation of Section 412. They noted that the PATRIOT Act provision is written to “take [a non-citizen] into custody,” not to retroactively designate someone already in detention as a threat.

“If the government were to prevail in its claim of extraordinary and unprecedented executive power, the government would be free to lock up non-citizens indefinitely based solely on executive say-so, even after they completed serving their sentences,” said Jonathan Hafetz, a lawyer with the American Civil Liberties Union.

While the Supreme Court has determined that the federal government cannot simply lock up foreigners on American soil indefinitely if they aren’t able to deport them (in Zadvyas v. Davis in 2001), it has been reluctant to intervene in terrorism related cases. In a subsequent case (Hamdi v. Rumsfeld), the Supreme Court gave the feds clearance under the 2001 Authorization for Use of Military Force to indefinitely detain prisoners determined to be enemy combatants. And even though our military actions in 2019 bear little resemblance to the “war on terror” launched after 9/11, the Supreme Court in June declined to reconsider any limits to that authority.

And no, this bureaucratic cruelty isn’t unique to the Trump years. Barack Obama’s Justice Department attempted a similar move against Mohammed Rashed, who set off a bomb on Pan Am flight 830 back in 1982, killing one man. Rashed, like Hassoun, was a Palestinian (officially born in Jordan); after his sentence was completed in 2013, no country wanted to take him in. The Obama administration kept him in detention, but before a judge could rule on whether it had the authority to do so, Mauritania agreed to take him.

But with Hassoun, unlike Rashed, the feds have never even made a case tying his actions to any identifiable victims. What’s more, a federal judge rejected a request for a life sentence, noting that the feds had surveilled him for years and knew he was sending money abroad some time before charging him, contradicting any claim that the man “poses such a danger to the community that he needs to be imprisoned for the rest of his life.”

Nevertheless, unless judges intervene (or another country agrees to take him in), Hassoun will continue to be punished with imprisonment long after his sentence has ended.