This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Protesters who demonstrated against racial injustice in Beverly Hills, California, last summer must have criminal charges against them dismissed because the city’s emergency ordinance to arrest them was unconstitutional, a judge ruled Friday.

The wealthy city’s decision to prosecute more than two dozen protesters, who had been part of demonstrations nationwide to decry the killings of George Floyd and Breonna Taylor by police, has been criticized for months.

Other Los Angeles-area prosecutors have declined to move forward with cases against thousands of peaceful protesters. The Los Angeles Times first reported the judge’s ruling Friday.

Beverly Hills, known for Rodeo Drive and home of the rich and famous, proclaimed a local emergency on May 30 and imposed nighttime curfews after demonstrations spread to the city, which borders Los Angeles and West Hollywood.

Two weeks later, the city barred noisy gatherings of more than 10 people after 9 p.m. to “preserve the peace and tranquility of residential neighborhoods.” The penalty was a misdemeanor charge punishable by up to 6 months in jail.

On June 26, the Black Future Project organized a largely peaceful protest that included about 75 people. About a third of them were arrested for violation of the city’s ordinance; one person was arrested on suspicion of arson for burning an American flag in a separate case.

The protesters were initially held on $5,000 bail — an amount that critics said was excessive and heightened the risk of getting sick amid the coronavirus pandemic — but were released the next day after the outcry.

Los Angeles County Superior Court Judge Mark Windham ruled that the ordinance violated people’s free speech.

“Beverly Hills cannot prohibit legitimately targeted disturbances with a measure that equally prohibits innocent protected expression,” he wrote.

Beverly Hills does not have a city attorney’s office for misdemeanors and contracts with an outside law firm, according to The Los Angeles Times. Other cities in Los Angeles County, however, let the county district attorney’s office handle misdemeanor prosecutions.