A Los Angeles judge has cleared a former gang member of a murder conviction that kept him in prison for 19 years.

Prosecutors in court Monday afternoon said they were convinced their chief witness had lied, and they asked for the release of John Smith, who had been convicted in a 1993 drive-by shooting in South Los Angeles.

A cheer went up in the courtroom as Judge Patricia Schnegg ordered Smith's release, and the judge thanked the attorneys for the "opportunity to do justice."

The 37-year-old Smith entered the courtroom in a prison jumpsuit but was expected to be released by the end of the day.