For 25 Somali migrants who alleged Immigration and Customs Enforcement officers physically and sexually abused them while in custody, their time in the U.S. has ended.

The migrants, part of a group of 113 Africans set for deportation, boarded a plane in Texas on Thursday bound for South Sudan, and Somali officials confirmed their arrival in Mogadishu, ICE said on Friday. A week earlier, Texas civil rights organizations had released a public report detailing the treatment that 30 of the Somali men allegedly endured while at a notorious Texas detention facility: physical and sexual abuse, racial slurs, denial of medical care, and arbitrary placement in solitary confinement.

The complaints prompted a federal investigation that ICE knew about, documents revealed. Still, the agency moved to deport the Somalis. Only five of the 30 men won emergency appeals to stay in the U.S. The rest returned to Somalia, where the terror group al-Shabaab awaits many of them.

Lawyers for the migrants said they filed multiple complaints to local and federal authorities about their clients' treatment at the detention facility, which included being pepper-sprayed to the point of coughing up blood, hit in the face, and fondled, among other alleged abuse, according to the report. The Department of Homeland Security’s internal watchdog, the Office of the Inspector General, then launched an investigation.

ICE, however, declined to comment on the investigation — or on the veracity of the allegations in the complaints — but said the agency became aware of the migrants’ alleged treatment after the report dropped last week. ICE’s Office of Professional Responsibility is now investigating.

“U.S. Immigration and Customs Enforcement’s Enforcement and Removal Operations takes very seriously any allegations of misconduct or unsafe conditions,” an ICE spokesperson told VICE News in a statement. “ICE maintains a strict zero-tolerance policy for any kind of abusive behavior and requires all staff working with the agency to adhere to this policy.”

ICE’s El Paso Acting Field Office Director William P. Joyce, however, acknowledged that the Office of the Inspector General had come to Texas to speak to the detainees for the investigation on Monday, according to a Wednesday letter he sent to lawyers representing the detainees.

“We worked in conjunction with the Department of Homeland Security, Office of the Inspector General to provide access to the named detainees,” the letter reads.

The Office of the Inspector General neither confirmed nor denied the investigation to VICE News, but ICE verified that Joyce’s letter was authentic.

“Insofar as the remainder,” the letter continues, referring to the Somalis who couldn’t secure emergency deportation stays, “there are no legal impediments to their removal, and I am not presently disposed to stay their removal.”

Under the Obama administration, a 2014 policy suggested ICE should consider if people were victims or witnesses to crimes, or if they were seeking civil rights relief, before deciding to deport them. But in 2017, the Trump administration rescinded that policy and most other Obama-era immigration directives.

Somalia is included in the latest iteration of President Trump's controversial travel ban, which severely restricts travel from eight mostly majority-Muslim countries to the U.S. His administration also deported 521 Somalis in fiscal year 2017, up from 198 the period before, according to federal data.

Prior to Thursday, the Somalis’ deportation flight was rescheduled, and the detainees were moved multiple times. The last-minute changes made it difficult for their families to bring them any possessions, according to the lawyers involved in the case.

“They didn’t have anything to take with them,” said Fatma Marouf, director of Texas A&M law school’s immigrant rights clinic, which is representing men on the flight. “They’d arrive in Somalia with no proper shoes, no clothes, no nothing.”

Even the five Somalis who managed to secure last-minute stays are worried. If they lose their deportation appeals, they’ll likely be sent back to their home country, where al-Shabaab is spreading terror.

One Somali named Abdullahi, for example, fled Mogadishu in 2009 after members of al-Shabaab killed his brother and told him “You’re next,” according to his lawyer. After having his birth certificate stolen, and thus having problems identifying himself in court, he was denied asylum in the U.S. (Abdullahi’s last name has been withheld to protect his identity in the event he loses his appeal to stay in the U.S.)

Here's a full copy of Joyce's letter acknowledging the investigation: