Rene Lima-Marin sits for a 2014 interview with The Associated Press inside Kit Carson Correctional Center, a privately operated prison in Burlington, Colo.

(AP Photo)

What was supposed to be a joyous homecoming for a Colorado man whose 98-year prison term was cut short turned to heartache when he was detained by immigration officials just as he was set to be released.

Rene Lima-Marin's wife, Jasmine, had decorated her home with balloons Wednesday and said she was on standby to drive to the prison to pick him up. Instead, he called her to tell her that he was being held by Immigration and Customs Enforcement.

"Everyone is completely devastated. Everything has been turned on its head," said Lima-Marin's Denver-based attorney, Kimberly Diego, who added that she is scrambling to find him an immigration attorney.

Lima-Marin, who came to the U.S. from Cuba with his parents when he was a toddler during the 1980 Mariel boat lift, was convicted in 2000 of multiple robbery, kidnapping and burglary counts after he and another man robbed two video stores at gunpoint. He was mistakenly released on parole in 2008. He then held a steady job installing glass, got married and has a stepson, Justus, 10, and son JoJo, 7, who was born while he was out of prison.

Authorities realized the mistake in 2014 and returned him to prison.

A judge on Tuesday ordered Lima-Marin's release, saying it would be "draconian" to keep him in prison and that he had paid his debt to society. But Immigration and Customs Enforcement can request that an inmate suspected of an immigration violation be held after their release from jail or prison under a form referred to as a hold or a detainer.

Lima-Marin never applied for citizenship, his father, Eli Borges, told The Denver Post. The so-called "wet foot, dry foot" policy sent back Cubans intercepted at sea but gave those who reached land an automatic path to legal residency. Before leaving office in January, President Barack Obama announced the end of that policy as part of normalizing ties between Cuba and the U.S.

President Donald Trump has been critical of his predecessor's moves to improve relations with the Castro government and promised to re-evaluate the agreements with Cuba. He has not yet said publicly whether he intended to reverse specific policies.

The Colorado Legislature approved a nonbinding resolution earlier this month urging Gov. John Hickenlooper to grant Lima-Marin clemency. Hickenlooper said Wednesday that the Department of Corrections was required by law to release Lima-Marin to Immigration and Customs Enforcement officials.

"We can't imagine the emotional roller coast this family has endured. ... The family has shown amazing strength and we hope this is a temporary stop on his way to being reunited with his family," he said.

Lima-Marin's co-defendant, Michael Clifton, is serving a 98-year sentence.