Gary Bryant Jr., left, was convicted in 2017.
Los Angeles CNN  — 

The murder convictions of two Black men in northern California were vacated Monday after a judge ruled the introduction of rap lyrics and racialized rhetoric violated the Racial Justice Act, a law designed to limit racism within the criminal justice system.

The decision comes on the heels of Gov. Gavin Newsom’s signing of new legislation that limits the use of rap lyrics in criminal court cases in the state, touted as “a form of creative expression.”

In 2017, amateur rappers Gary Bryant Jr. and Diallo Jackson were found guilty of gang enhancement in the 2014 fatal shooting of Kenneth Cooper.

Bryant Jr. and Jackson were convicted of Cooper’s murder “for the benefit of a criminal street gang,” Contra Costa County Superior Court Judge Clare Maier writes in her order. The prosecution originally introduced the rap lyrics to prove the defendants’ gang affiliation, according to the court order.

Bryant was 28 years old and Jackson 21 at the time of the murder. Their lyrics were presented at trial as generally violent, but made years before the murder occurred with no factual link to the charges, Bryant’s defense attorney Evan Kuluk said.

While the cases were not contingent on the law’s expansion, a precedent could be set for future cases, according to Kuluk.

“The Racial Justice Act, the creative expressions bill 2799, and this case are all moments of positive change in making the legal system more just,” Kuluk said. “Hopefully making cases more fair for defendants facing similar issues.”

By using the defendants’ rap lyrics, the prosecution “though not done to purposefully invoke racial bias, more likely than not triggered the jury’s implicit racial bias against African American men.”

A racial epithet that was repeated in quoting the men’s rap lyrics, the judge found, was discriminatory and “dehumanizing in its reference to the African American race.”

The racialized rhetoric, as cited in the ruling, included the use of slang terms like “pistol whip” and “drug rip.”

The judge wrote that “it was more likely than not that these [slang] terms activated a racial stereotype” while the slur “resulted in priming the jury’s implicit racial bias against African Americans.”

The Contra Costa County District Attorney’s Office said they will proceed with criminal charges against Jackson and Bryant in a new trial while an internal policy change will be applied to stay in accordance with the law. Public Information Officer to the DA Ted Asregadoo said they still have a strong case against both defendants.

“This is not a case where that Bryant and Jackson were convicted of murder solely because of rap lyrics,” Asregadoo said. “The jury found them guilty on all counts, including first degree murder, and was because of all the evidence the prosecutors presented in court, and that proved beyond reasonable doubt that they were responsible for murdering Kenneth Cooper,” he said.

Kuluk had no comment on a new trial due to ongoing litigation.

The ACLU of Northern California expressed their support in the judge’s decision, tweeting on Tuesday: “This ruling represents a major victory for free speech. It’s high time that prosecutors stopped weaponizing a form of artistic expression to send Black men away for long prison terms.”

The ACLU was a co-sponsor in the Racial Justice Act’s expansion.

“This result is a first of its kind reckoning with some of the pervasive impact of implicit bias in criminal proceedings,” Chessie Thacher, a senior attorney with ACLU of Northern California, said. She emphasized more work is still to be done.

“This [case] took a lot of resources for a court to consider, and it’s an after-the-fact correction. And so we just need to keep doing the good work to get our system to be fair.”

Monday’s decision comes amid a national conversation around prohibiting the use of rap lyrics as evidence in criminal proceedings, a tactic critics have called a racist double standard and an infringement on First Amendment rights.

California’s newest legislation, which was signed into law last week limits the use of rap lyrics in criminal court cases in the state.

The law requires “a court, in a criminal proceeding where a party seeks to admit as evidence a form of creative expression, to consider specified factors when balancing the probative value of that evidence against the substantial danger of undue prejudice.”

“Artists of all kinds should be able to create without the fear of unfair and prejudicial prosecution,” Newsom said in a statement Friday. “California’s culture and entertainment industry set trends around the world and it’s fitting that our state is taking a nation-leading role to protect creative expression and ensure that artists are not criminalized under biased policies.”

Democratic US Reps. Hank Johnson of Georgia and Jamaal Bowman of New York proposed legislation in July that would ban lyrics from being used as evidence in legal claims though there has been no movement on the legislation in the House since its referral to the House Judiciary Committee.

CNN’s Shawna Mizelle contributed to this report.