NBC News - A Missouri man who was locked up after officials realized he never served a 13-year sentence is being released from prison by a judge who decided he turned his life around when he should have been doing time.

Cornealious "Mike" Anderson's family began crying when the court granted his request for release nine months after he began serving the sentence he was given in 2000.

Anderson was convicted of the 1999 armed robbery of a Burger King manager making a bank deposit but was out on bail while he appealed.

His appeals were shot down, but because of what the state has labeled a clerical error, he never went to prison.

Instead, he became a married father of four, a businessman and a youth football coach — an upstanding life interrupted when state officials realize the mistake and put him behind bars.

Anderson noted he had made no effort to conceal his identity while he was free. Tens of thousands of people signed a petition on
urging his release.

Missouri Attorney General Chris Koster said in a statement that the outcome was "appropriate."

"From the outset, I have proposed a solution that balances the seriousness of Mr. Anderson's crime with the mistake made by the criminal justice system and Mr. Anderson's lack of a criminal record over the past 13 years," he said.

"Today's outcome appears to appropriately balance the facts as we understand them."