An immigration judge has ordered the release of a man convicted of a crime but who was released from prison erroneously early, re-arrested and released again only to be put into ICE custody.

The judge also dismissed Rene Lima-Marin's deportation case.

In May, Gov. John Hickenlooper announced he would pardon Lima-Marin -- his first pardon in his six years in office.

PREVIOUS: Gov. Hickenlooper pardons Rene Lima-Marin; issues statement

Immigration and Customs Enforcement has the right to appeal the judge’s decision within 30 days with the DOJ’s Board of Immigration Appeals. Until this decision is made, Lima-Marin will remain in ICE custody.

Generally, they’ll make the decision within a day or two, according to attorney Aaron Elinoff.

Rene Lima-Marin, who came to the U.S. from Cuba as a child, was sentenced to two prison terms totaling 98 years back in 2000 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 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.