A courtroom erupted in applause, cheers and shouts of “We love you” as a former gang member imprisoned for 19 years for a murder he didn’t commit was exonerated and set free September 24.

John Edward Smith, who was still in jail clothing when he appeared in court, smiled broadly, acknowledging his excited family and friends.

Adding to the Hollywood-style courtroom drama, those applauding for Smith included pop star Chris Brown, who was in the same courtroom for his probation hearing involving the 2009 beating of his then-girlfriend Rihanna.

“Thank you for your enthusiasm,” Superior Court Judge Patricia Schnegg told the crowd as she vacated Smith's convictions for murder and attempted murder in a gang-related drive-by shooting. Prose­cutors told her they were convinced that the lone eyewitness to the 1993 incident had lied at Smith’s trial, naming him as the shooter. Smith always maintained he was at his grandmother’s house when the shooting occurred several blocks away.

“Thank you for the opportunity to do justice,” the judge told lawyers for both sides after she announced her ruling.

Smith, wearing glasses and a tan striped polo shirt, was released from a Los Angeles County jail at about 8:30 p.m. He was greeted by a host of TV cameras.

“I had good days and bad days, I stayed hopeful and that’s all I could do,” he told the media gathered outside the downtown jail. “I’m not bitter at all, because that ain’t going to get me nowhere. I’ve got to move on.”

He said he was looking forward to “going home and seeing my grandmother,” who raised him. Family members drove him to her house, which she had mortgaged to pay for his initial defense, O’Connor said.

The grandmother, 79-year-old Laura Neal, used a walker to attend the hearing earlier in the day, and wept when Schnegg announced her decision.

“I always knew he didn’t do it,” Neal told reporters after court. “I’m happy and sad. But the part of me that was in there with him — I’m free now too.”

She said it was difficult to wait through the weekend after Smith’s hearing was delayed on Friday September 21.

“It was hell,” Neal said. “Friday was a big disappointment.”

Smith’s lawyer, O’Connor, explained, “The closer you get to freedom, the harder it is to wait another day.”

The 37-year-old Smith was 18 when he went to prison. He maintained he was at his grandmother’s house with family when the shooting took place Sept. 9, 1993, in a gang-infested area.

He said he knew nothing about the crime until his mother called to tell him about it.

The only eyewitness — a victim who was shot and survived — said police pressured him to identify Smith as the shooter.

Prosecutors told the judge they now believe he lied, and Schnegg found the conviction was based on perjured testimony.

Smith’s exoneration was pursued by Innocence Matters, a public interest law firm in Torrance.

The eyewitness, Landu Mvuemba, met with Innocence Matters representatives in 2010 and immediately blurted out that he had lied at the trial, said O’Connor, who heads the group.

“Within the first two minutes of the interview, Mvuemba recanted,” O’Connor said. Mvuemba was 16 at the time of the shooting.

He told representatives of Innocence Matters, “The police told me they knew who did it,” a defense motion stated.

O’Connor said Smith wept when she called him with the news about Mvuemba. “He said, ‘Why did he do it? Why did he lie?’” O’Connor recalled.

Mvuemba said police pointed to Smith, whom he had known in elementary school, and told him other witnesses had identified Smith as the shooter. Mvuemba said he also was shown a photo of his friend DeAnthony Williams, who died in the shooting.

“I felt a lot of pressure to go along with it,” Mvuemba said.

The two victims had been on the street examining the scene of another shooting the night before when a car pulled up and someone opened fire.

Mvuemba said he tried three times to tell authorities that he didn’t see enough to testify, but his pleas were ignored.

“Mvuemba knew it was wrong to identify Mr. Smith as the man who shot him,” according to the defense motion. “But when he saw his deceased friend’s crying mother in the courtroom, he felt as if he had no other choice.”

Mvuemba is currently imprisoned on a rape conviction.

Judge Schnegg said she held many meetings with the defense and prosecution in the year since the recanting was disclosed.

She told Smith in court: “You had a very committed attorney, and you had a prosecution team that did the right thing.”

Schnegg also said they lacked sufficient information to declare Smith factually innocent, but she vacated his convictions for murder and attempted murder, and ordered him released.

O’Connor said Smith’s trial was undermined by ineffective assistance of attorneys who failed to investigate the case properly at trial and on appeal. She said lawyers and police often take “shortcuts” in gang cases.

“Mr. Smith was not the shooter,” the motion said. “He was not at the scene of the crime.”

Smith’s sister, Tiana Goodman, 25, said he would be meeting nieces and nephews who were born while he was in prison.

“This is a big day for our family,” she said, tears running down her cheeks. “He kept his faith and never gave up.”