Omar Kalmio was never supposed to get to North Dakota. The Somali national from Eagan was supposed to be deported because of his violent criminal record in Minnesota.

Instead, he was released from custody when federal officials could not send him back to Somalia. Eight months later, he murdered four people in Minot in one of the most deadly crimes ever committed in modern-day North Dakota.

“This may have been avoided had he been deported after that conviction in Minnesota,” said Kelly Dillon, the deputy North Dakota attorney who prosecuted Kalmio.

Like Kalmio, thousands of criminal immigrants have been sent back to the streets of this country in recent years because their homelands refused to take them back. Sometimes, the consequences have proved deadly.

More than 20,000 offenders released in the past seven years include hundreds of convicted murderers and at least five convicted of terrorism, data obtained by the Star Tribune show.

In the Upper Midwest, including Minnesota, more than 85 percent of the more than 800 who have been released are what the government considers their most dangerous offenders. Many have committed additional crimes after being released from an immigration system that appears hamstrung and intensely secretive.

Many times U.S. Immigration and Customs Enforcement (ICE) quietly releases the offenders without notifying their victims or local law enforcement, often citing privacy concerns.

“It’s unfortunate that the rules don’t allow somebody that has been convicted and is a foreign national to be sent home,” said Minot Police Chief Jason Olson.

A six-month time limit

In a vast immigration system where ICE makes more than 360,000 removals a year, the issue of what to do with about 3,000 criminal immigrants may seem trifling. But it has proved perplexing.

The U.S. Supreme Court has twice raised serious constitutional concerns about holding immigrants indefinitely, even those with violent pasts. U.S. courts have ruled that federal authorities generally have only a six-month window to get immigrants with criminal histories out of the country, or they must release them. That time goes by quickly when the home countries stall the process or refuse to take them.

Even when the rules might allow ICE to hold a criminal longer, the agency admits that rarely happens because the agency must prove the offender represents an imminent and immediate danger.

Since those rulings in 2001 and afterward, Congress has struggled to set the balance between protecting the public and protecting the Constitution. So far, it has found no answer.

One proposal would refuse visas to any country that refuses to repatriate their criminals. Another would refuse visas to diplomats from those countries.

Frequent targets among the more than 20 countries that routinely block deportations are Cuba, China, India, Pakistan and Vietnam. ICE and the U.S. State Department have been working to expedite the process of removals with resistant countries.

Michele Garnett McKenzie, director of advocacy for the Advocates for Human Rights, a Minneapolis-based human rights organization, recalled clerking in immigration courts in Arizona early in her career, before the court ruling. One of the judges took her to a detention pod and pointed to a group being held.

“The judge said, ‘See that? Those are all Southeast Asians; they are here for life. They are never getting out,’’ she recalled.

She said problems that arise from reoffending immigrants are more of an issue with the penal system than with the immigration system.

“America doesn’t have two sets of criminal justice systems. We have one, and that’s right,” she said. “American due process is the most proud part of living in this country, knowing we have that stability and the rule of law. That’s the essence of us as Americans.”

ICE does not keep track of how many released offenders go on to commit additional crimes, but the agency believes the number of offenders rebooked into ICE custody may be as low as 7 percent.

“While crimes by aliens are of significant concern, ICE is not in the business of holding detainees for indefinite lengths of time,” Gary Mead, an ICE official for removal operations, told a congressional committee. “The removal of criminal aliens consumes time and poses challenges.”

The practice often isn’t noticed until a released offender makes headlines.

In Fort Myers, Fla., a Cuban immigrant who served time for armed robbery was released when Cuba refused to take him. He shot a police officer in the face.

In Flushing, N.Y., Huang Chen was ordered removed for assaulting his neighbor. China refused to grant Huang the necessary documents for travel and he was released. He then committed another assault and again was ordered removed. Again China refused and he was released. He returned to his original victim, who had no idea he was free, hit her on the head with a hammer and stabbed her with a knife, ripping out her heart and a lung.

Minot murders

Then there is Omar Kalmio.

In January 2006, Kalmio was charged with stabbing a man in the back three times and once in the face in Minneapolis. He pleaded guilty, was sentenced to prison in St. Cloud and was released in January 2007.

The next month, Kalmio, who had been working in the oil fields in Williston, was detained by ICE in Minot for failing to abide by the conditions of his release. He was held off and on until May 2010, when ICE released him. The agency said arrangements could not be made to deport him to Somalia, which had no functioning government at the time.

Eight months later, Kalmio, then 26, was accused of shooting his ex-girlfriend to death over a custody dispute involving their child, and then killing her mother, her 13-year-old brother and her boyfriend. Three were shot in the head at close range as they slept. Kalmio’s baby girl was found unharmed in his ex-girlfriend’s apartment.

After Kalmio’s arrest, his brother notified police that they were both willing to be sent back to Somalia.

“I personally think that was him blowing smoke,” said Sgt. Dave Goodman, the lead detective in the case. “They were open to that because they knew it was never going to happen.”

Kalmio now sits in the North Dakota State Penitentiary in Bismarck, sentenced to four consecutive terms of life in prison without parole. “Had he been deported, that crime would have never occurred,” said Olson, the police chief.

‘Minimal public interest’

Through the Freedom of Information Act, the Star Tribune obtained ICE data on more than 20,000 immigrant offenders released nationwide under the court ruling.

The information includes the most serious criminal conviction, the release date and the regional office responsible for overseeing the release.

ICE refused to provide the names of those released, citing “an unwarranted invasion of personal privacy” that outweighs “any minimal public interest.” ICE refused even though a federal judge ordered the names released last year after the Boston Globe filed suit seeking the same information. The Star Tribune has appealed the denial.

The data ICE did release show that between 2,600 and 3,900 criminal immigrants are released each year. Since 2007, 618 immigrants convicted of homicide and 1,012 convicted of rape and sexual assault have been released.

From the St. Paul office, which oversees Minnesota, North and South Dakota, Nebraska, Iowa, Kansas, and Missouri, 812 offenders have been released, including 16 convicted of homicide, 93 convicted of sexual assault and one convicted of terrorism. Almost 85 percent of those were convicted of Level One offenses, the most serious.

Convicted immigrants come into ICE custody from various locales, including county jails, state and federal prisons, and at-large arrests. ICE contacts the home country of a deportee to coordinate and secure travel documents.

The six-month window starts when the removal period begins.

Asked for ICE’s position on releasing convicted immigrants, a spokesman said in a statement: “ICE’s position is that we are required to follow the laws of the United States.”