(CNN) Critics of drug-possession prosecutions often argue that they unfairly target people of color. Seattle, where recreational use of marijuana was legalized in 2012, is doing something about it.

All seven judges on the city's municipal court agreed this week to vacate convictions from 1996 to 2010 for misdemeanor marijuana possession, saying that they disproportionally impacted people of color.

Of the more than 500 cases cited, 46% involved African-American defendants, the judges said in their ruling.

As of July 2017, the population of Seattle was about 7% African-American, according to US Census data

More than 500 people in the city will see their marijuana-related convictions set aside if they were prosecuted before the state of Washington legalized weed. According to the ruling, vacating the convictions "serves the interests of justice."