CONCORD, N.H. (AP) — A Salvadoran man who claims he was jailed, beaten and tortured after being wrongfully deported from the United States filed a lawsuit Tuesday against the federal government seeking damages for his treatment.

José Daniel Guerra-Castañeda, 25, who has since been returned to the United States and lives in Massachusetts, said in the lawsuit filed on his behalf by the ACLU that he was deported by Immigration and Customs Enforcement in 2019 despite a court order allowing him to remain in the U.S. He said he had been wrongfully accused of being a gang member in El Salvador and committing murder.

Guerra-Castañeda alleges he spent nearly 300 days in a crowded and unsanitary jail upon his return to El Salvador, where he “experienced torture and other forms of physical and emotional trauma.” As a result, he said in the suit filed in U.S. District Court in Massachusetts that he continues to suffer physical and emotional pain including lingering back pain.

“ICE’s violation of federal court orders to keep our client in the country cost him horrifying physical and emotional trauma that will last a lifetime,” said SangYeob Kim, an immigration staff attorney at the ACLU of New Hampshire which filed the lawsuit along with the Preti Flaherty law firm.

“No human being should be sent by the United States to a country where they will be tortured or persecuted before they ever have an opportunity to challenge their removal,” Kim said. “No one is above the law, and when the court issues an order, we are all bound to uphold it — especially the United States government.”

A spokesman for ICE did not immediately respond to a request for comment.

A federal judge in Boston ruled in 2019 that Guerra-Castañeda could remain in the United States to fight deportation efforts over an alleged murder he committed in El Salvador. Guerra-Castañeda, who was living in Massachusetts but was detained in New Hampshire, has argued he would face “persecution and torture” in El Salvador.

The ACLU said Guerra-Castañeda had been sent to a detention center in Louisiana ahead of his pending deportation. After the court ruling, court records show ICE officials in Boston sent an email to their colleagues in Louisiana advising them that Guerra-Castañeda should not be deported.

Despite that correspondence, the ACLU said he was deported, two days after the second of two court orders staying his deportation.

In its lawsuit, the ACLU said that officials at ICE and the Department of Homeland Security should have been aware of the order to keep Guerra-Castañeda in the country. They also argue that Guerra-Castañeda’s treatment in El Salvador could be blamed on his wrongful deportation.

Guerra-Castañeda was returned to the United States by ICE in November 2020, after his criminal charges were dropped in El Salvador. He ended up spending 417 days in the country. He is in the process of applying for a green card.

The ACLU said Guerra-Castañeda’s case is a part of a trend. Nationwide, it said, it has documented at least eight cases in which ICE attempted to deport someone after a court ruled the person could stay. In three cases, it said, the person was illegally removed despite a law prohibiting it. In five cases, an immigration lawyer intervened and prevented their deportation.