Updated

A 49-year-old Missouri man who served nearly 20 years in prison for first-degree murder has been freed after a judge criticized how the homicide investigation was handled and the state's top prosecutor recommended that charges be dismissed.

David Robinson was greeted with hugs as he emerged around 10 p.m. Monday from the Jefferson City Correctional Center.

Missouri Attorney General Josh Hawley reviewed a judge's ruling in February that found a police detective was "lacking in candor or competence, or both." That detective's investigation helped send Robinson to prison for life in the fatal shooting of Sheila Box in Sikeston in 2001. The detective has resigned.

Hawley also evaluated the evidence available for a retrial. Since Robinson's sentencing, another man has confessed to killing Box and two witnesses have recanted.