JACKSON, Miss. (AP) — The Mississippi Supreme Court chief justice cannot be sued over a state law that requires him to appoint some judges in the capital city of Jackson, a federal judge wrote Thursday in a ruling that also condemned violence in the city.

U.S. District Judge Henry Wingate did not address residents’ constitutional rights in his ruling, saying he will do that later. But, Wingate wrote: “Jackson has a crime cancer.”

Wingate cited the principle of judicial immunity, which prevents judges from being sued for most of their official acts, as he removed Chief Justice Mike Randolph as a defendant in a lawsuit filed by the national, state and local chapters of the NAACP.

“Chief Justice Randolph must be dismissed from this litigation, which still will continue with the remaining parties to address the constitutionality of H.B. 1020 as a whole,” Wingate wrote.

House Bill 1020, signed into law by Republican Gov. Tate Reeves in April, expands the territory of a state-run police department within the capital city of Jackson and creates a new court in part of Jackson with a judge appointed by the chief justice. It also requires the chief justice to appoint four temporary judges to serve with the four elected judges in Hinds County Circuit Court.

Reeves and legislative leaders said the law is intended to help curb crime. But, the NAACP and other critics say the creation of a new court and the appointment of judges by a white chief justice is a way for the majority-white and Republican-led Legislature to wrest local control from residents of Jackson and Hinds county, which are both majority-Black and governed by Democrats.

Wingate on May 22 issued an order that temporarily prevents the law from taking effect. Without indicating how he will rule later in the lawsuit, Wingate wrote that “Jackson’s crime problem is sweltering, undisputed and suffocating.”

He wrote that the city has high rates of homicide, rape, robbery, aggravated assault, sexual assault and burglary.

“Caught in this ‘race to the grave’ are the most innocent — young children whose still developing lungs had barely tasted the nutritious air which was their birthright,” Wingate wrote. “On the other end of this ‘killfest’ are the senior citizens hoping to spend their golden years in retired harmony with family and friends, instead of outfitting their homes as fortresses.”

A separate lawsuit challenging the new law was filed in state court, with some Hinds County residents arguing that the appointment of judges tramples their rights, because most judges in the state are elected. Hinds County Chancery Judge Dewayne Thomas removed Randolph as a defendant, also citing judicial immunity. Thomas later dismissed the state lawsuit by ruling that appointing judges does not violate the Mississippi Constitution. Plaintiffs are appealing Thomas’ ruling to the state Supreme Court.