Twin Cities attorneys are scrambling to block the deportation of a group of Somalis said to be slated for a federal flight to Africa this week — the government’s first such attempt since a botched deportation effort in December that led to a legal battle.

Attorneys for some of the detainees say at least a dozen Minnesota Somalis are part of a larger group under detention in Texas, where guards have said they will be placed on a chartered Immigration and Customs Enforcement (ICE) flight to South Sudan as early as Thursday.

The attorneys argue that the failed December flight, which returned to the United States after 20 hours on the ground in Senegal, calls into question the government’s ability to safely deport people to Somalia, which they say remains too dangerous for American refugees.

A federal judge in Miami has temporarily blocked the deportations of 92 passengers on that flight, including about 28 from Minnesota.

“The last flight demonstrated that ICE isn’t able to safely deport people to Somalia,” said John Bruning, an attorney at Kim Hunter Law in St. Paul, which has two clients detained in Texas. “We are concerned the same issues will arise on this flight.”

ICE does not release information about deportation flights in advance. But in court, the agency has said it has conducted numerous successful missions to Somalia and that detainees, including some with serious criminal records, were granted due process before being deported. Deportations to Somalia resumed under President Barack Obama and picked up significantly last year after President Donald Trump took office.

The Somalis either came as refugees but lost their legal status because of criminal convictions or they unsuccessfully applied for asylum.

ICE said logistical problems caused the return of the December flight.

But a lawsuit filed on behalf of the passengers alleges that they were physically abused by guards on the flight, and argues that publicity surrounding the incident increases the risk that they would be targeted for death or punishment by militants on arrival in Somalia, which remains racked by civil unrest.

The suit was filed by the University of Minnesota’s Center for New Americans and three other organizations.

The Miami judge, Darrin Gayles, has signaled that he might allow that group of deportees to stay in the United States until immigration judges revisit their cases.

The litigation also seeks class-action status that could protect other Somalis facing deportation from the United States. But that bid won’t pan out in time for the group currently detained in Texas, said Malee Ketelsen-Renner, a Bloomington attorney who has a client there and has also helped with the Florida suit.

Ketelsen-Renner said clients in Texas told her that officials there alerted detainees they would be flown to South Sudan with a group of Sudanese and Congolese deportees. She said she obtained names and identification numbers for 12 Somalis from Minnesota, among several dozen from across the country held at the facility.

Ketelsen-Renner said she was told by a Somali embassy staff member in Washington, D.C., that the embassy knows of a group of Somalis slated to arrive in Africa on March 2. But she has not been able to get confirmation from ICE.

Bruning said he questions whether South Sudan, itself torn by civil strife, is a safe place for the plane to land and if there is a foolproof plan to then fly the Somali natives to their home country.

His office filed motions in immigration court to reopen the cases of two clients held in Texas and stay their deportations while those requests are pending. One client, who arrived in the United States as a teen refugee, later lost his legal status but has since become a respected youth mentor, attorneys said. A stay was granted this week in his case.

Another client asked for asylum in the United States, saying that Al-Shabab had killed his brother in Somalia and threatened him. His stay and an emergency appeal were both denied.

Ketelsen-Renner said she has tried unsuccessfully to find an attorney in west Texas who could challenge the deportations in federal court there.

Meanwhile, a group of relatives of the west Texas detainees have rallied to seek legal help.

One of them, Marly Melsh, said her fiancé, Abdullahi Jama, came to the U.S. as a refugee when he was about 10. He was ordered deported in 2013 after a string of misdemeanor and felony convictions. Jama has stayed out of trouble since then, Melsh said, but “a stupid mistake” last year led to a misdemeanor trespassing charge. ICE detained him after he was released from the Hennepin County jail in January.

Melsh said she worries that with his flawed Somali and Western clothes, Jama would stand out in the country of his birth, where militants have targeted returnees from the West.

“They are sending people who are targets to either be recruited or attacked,” she said. “They are young men by themselves who don’t have anything.”

He called her from detention on Wednesday, she said: “He told me he loves me in case we don’t talk for a long while.”