Cabduqaadir Mayow fled Somalia in 2014 and asked the United States for asylum, saying the terrorist group al-Shabab was threatening to kill him.

A judge, finding no credible evidence to support the claim, ordered him deported. But with no functioning government in Somalia, the Department of Homeland Security let Mayow go. He moved to Minnesota, married a U.S. citizen in 2015 and hoped they could start a life in the country.

During a check-in on June 10, 2017, ICE arrested him and told him he would be deported to Somalia. For nearly two years he sat in jail, despite never being charged with a crime.

Mayow is one of hundreds of immigrants who languish for months and sometimes years in Minnesota jails awaiting deportation. Some are legal residents, others are seeking asylum. Some have criminal records for crimes committed years ago. All are appealing their deportation orders, but most have never had a hearing to determine whether they would be a risk of fleeing or to the public if they were to be released until their appeal could be heard.

As their deportation cases grind on, many have filed claims — called habeas petitions — to federal judges arguing their due process rights are being violated and asking for their release. The number of habeas petitions in the U.S. District Court in Minnesota jumped from nine in 2015 to 77 last year. Nationally, the number of such petitions is on pace to hit more than 2,000 this year, the highest total in a decade.

In their rulings, Minnesota's federal judges — including those appointed by Republican presidents — are troubled by the long detentions, and are frequently ordering immigrants released.

"People have rights," said Chief U.S. District Judge John Tunheim, who was appointed by President Bill Clinton. "Detention for long periods of time without a finding by a judge that someone can't be released on conditions is problematic."

Jim Stolley, chief counsel for ICE in the Minnesota area, gave several reasons why the number of cases has gone up dramatically. He said an executive order by President Donald Trump in January 2017 pushed ICE to detain and deport more foreign nationals with removal orders and criminal records. At around the same time, the United States made deportation agreements with countries like Somalia and Liberia.

Stolley said ICE regularly reviews each case to ensure that they should remain detained or be released.

"This is nothing punitive," Stolley said. "We're following the laws that Congress passed."

Mayow, who has no criminal record, has been taken to myriad lockups throughout the country over the last two years. He was on the notorious Somali flight with 91 other deportees who sat shackled on a Senegal runway for 23 hours before returning to the United States. He's appealed the original decision to deny him asylum, arguing that if he goes back to Somalia he will be killed. The U.S. Court of Appeals has put a stay on his deportation until that court reaches a final decision. Without explanation, he was released from the Freeborn County Jail Monday morning.

Criminal histories

Abdulkadir Abdi came to America as a Somalia refugee at age 17 in 1996. He went to prison in 2006 for stealing a car, and an immigration judge ordered him deported. But ICE couldn't send him; the Somali government wasn't accepting deportees.

Abdi left prison in 2007 and worked with police and community groups to keep young Somali-Americans out of gangs and terrorist groups. He worked at a drug and alcohol abuse clinic, where the owner commended him for his work.

But his deportation order never went away. On Jan. 30, 2018, ICE arrested him during a check-in.

"They say, 'This is the time to deport you. This is the time,' " said Abdi, who is now 40.

His attorney appealed the order, which dragged on for months while he sat in jail. He could talk to his wife, Rhoda, only through a computer screen and could never see her in person.

In August, his attorney filed a habeas petition with the U.S. District Court. In November, Magistrate Judge Hildy Bowbeer ordered a bond hearing for Abdi. Without one, she ruled, his due process rights were being violated.

More than a year after he was jailed, an immigration judge granted his release.

Abdi described his time in jail as "depression, stress, humiliation," he said. "But at least I came out."

Filing habeas petitions can be fruitful for the jailed immigrants, even those convicted of felonies. The Star Tribune reviewed all of the closed petitions filed in 2018 and found that about a third of the time ICE or a judge granted a release the immigrants' release or ordered a bond hearing.

One man, Ali Abdalla, was a U.S. citizen who had been jailed for six months before a judge ordered ICE to let him go.

ICE arrested another man, Abdullahi Ibrahim, in February 2018 though he had no criminal record, a wife who was a U.S. citizen and a 10-month-old child. In October, a magistrate judge ordered him released. In April, Judge Paul Magnuson, appointed by President Ronald Reagan, ordered the government to pay the $4,730 of Ibrahim's attorney's fees.

Mohamed Abdi worked as a community service officer for the Owatonna Police Department when ICE arrested him. He came to the United States from Somalia in October 2006 asking for asylum but was denied, with a judge saying there were too many inconsistencies in his story. When ICE was unable to deport him, he moved to the Owatonna area, got married and had four children. While working as community service officer, he gathered information about local extremist group activity, according to court records.

Two months after his arrest in October 2017 he was shackled and placed on the same plane to Somalia that Cabduqaadir Mayow was on. In court filings, he described other immigrants being denied going to a bathroom and forced to urinate on themselves.

In December 2018, attorneys at the University of Minnesota Law School filed a restraining order to prevent his deportation and asked for his release. They argued that if he were sent back to Somalia, he would almost certainly be killed because of his informing and conversion to Christianity. After nearly 10 months in jail, ICE decided to no longer fight the case and released Abdi.

He declined to comment on his case, saying his appeal to remain in the country is pending.

The U.S. Supreme Court has said in a ruling that for many types of detainees, anything more than six months in jail is unreasonable. Nearly all of the immigrants who have filed habeas petitions in Minnesota have sat in jail for at least that long — sometimes up to two years.

Minnesota's judges have ruled for the immigrants when they believe their due process rights were violated, often granting relief for not only those with no criminal history or crimes from years ago, but also for some who have been convicted of recent felonies such as rape and assault.

Jessica Vaughn, the director of policy studies for the right-leaning Center for Immigration Studies, criticized the rulings.

"I think it's a stretch to conclude that these aliens' rights have been violated," she said. "According to the rules Congress wrote, they are not necessarily entitled to be released or even to have a bond hearing. … Eventually the higher courts will have to step in, or if Congress wants to change the rules to restore some balance."

Stolley, the chief counsel at ICE's Minneapolis office, said the department wants to avoid another case like Omar Kalmio. He was supposed to be deported because of his violent criminal history in Minnesota. Unable to deport him back to Somalia, ICE released him in May 2010. Eight months later, he murdered four people in North Dakota.

Free to go

At about 5 a.m. Thursday, a Freeborn County jailer told Cabduqaadir Mayow to wake up and get his things. He was taken to a holding cell in Bloomington, then told he was free to go. He was never told why he was released. He called his wife, Habon Osman. He told her he was on a train back to downtown Minneapolis, and would meet her at one of the stops. When she got there, she saw him and immediately burst into tears.

"I'm so happy," she said. "So happy."

The next day Mayow was fitted with an ankle bracelet so ICE can monitor him. He doesn't know what's next, other than he hopes this means he gets to stay in the country and find a job. If he goes back to Somalia, "I know I'll be killed," he said Thursday.

But for now, he can make plans.

"I'm happy to be outside, happy to be in my house, to be with my wife," he said. "That's my plan."