A day after a judge ordered Rene Lima-Marin's release from prison, Lima-Marin is back in custody -- this time with Immigration and Customs Enforcement.

In preparation for Lima-Marin's release on Wednesday, a Criminal Justice Information Services review determined Lima-Marin possibly had an ICE detainer.

By law, the DOC is required to notify ICE of a detainer prior to release. After his release from DOC, he was taken into ICE custody.

Rene Lima-Marin_1494995540415.jpg

On Tuesday, Lima-Marin's wife Jasmine bought balloons and gifts in anticipation of his return, but those gifts remain on stand by as the worry now shifts to the possibility of deportation.

Lima-Marin's attorney Kimberly Diego says Lima-Marin came to the U.S. from Cuba at the age of 2 during the 1980 Mariel boatlift.

Diego says Lima-Marin became a legal resident but never applied for U.S citizenship. Instead, she says, he was granted refugee status by the government.

Lima-Marin's history with the law began in 2000 when he was sentenced to two prison terms totaling 98 years for a pair of robberies he committed when he was a teenager.

The sentences were supposed to be served consecutively, but a court clerk marked them as a single term.

The error allowed for Lima-Marin’s release in 2008.

In the following years Lima-Marin stayed out of trouble, married, and started a family; only to be told in 2014 that the court had realized its mistake and he'd be going back to prison.

During those 8 years of freedom Lima-Marin never had run-ins with ICE.

Three years of legal battles between Lima-Marin’s family and the courts ensued after he was taken back to prison.

The legal battle ended Tuesday when Chief Arapahoe County District Judge Carlos Samour Jr. issued a 165-page ruling that ordered for Lima-Marin’s release.

“Requiring Lima-Marin to serve the rest of his prison sentence all these years later would be draconian, would deprive him of substantive due process, and would perpetrate a manifest injustice,” Judge Samour Jr. wrote. “Accordingly, the government is deemed to have waived its jurisdiction to compel him to serve the remainder of his sentence.”

Gov. John Hickenlooper released a statement about Lima-Marin's situation on Wednesday: "The family has shown amazing strength and we hope this is a temporary stop on his way to being reunited with his family."

This story is developing and will be updated.