A bipartisan group of Georgia district attorneys asked a Fulton County judge Friday to prevent a new oversight panel from launching investigations of local prosecutors.

The prosecutors say the Prosecuting Attorneys Qualifications Commission infringes on the powers of district attorneys granted by the Georgia Constitution. They say the legislation that created the panel would allow it to punish prosecutors for prioritizing some crimes over others or even for political purposes.

“There is just too much of a risk that, while acting in good faith, this commission will interfere with the authority and rights of district attorneys,” attorney Joshua Rosenthal, representing four district attorneys, argued Friday at a hearing in Fulton County Superior Court.

Attorney Josh Belinfante, defending the commission, said it might be able to discipline a district attorney for refusing to prosecute whole categories of offenses — such as personal marijuana possession — without looking at the facts of each individual case. But he said the Georgia Constitution gives legislators the authority to define prosecutors’ duties and to discipline them for failing to fulfill those duties.

“As a categorical, wholesale decision not to prosecute marijuana possession in Fulton County, that could be grounds (for discipline),” Belinfante said.

Friday’s hearing was the latest development in a battle over Senate Bill 92, approved by the General Assembly earlier this year. The law allows the commission to sanction or remove district attorneys for an array of causes, such as “willful misconduct” or “persistent failure” to follow the law. A five-member panel will investigate the complaints and decide whether to bring formal charges, and a separate three-member panel will issue orders and opinions.

During legislative debate, the commission’s supporters said the bill was essential to ensure that district attorneys follow the law after a wave of progressive prosecutors campaigned on promises that they wouldn’t charge low-level drug offenders or enforce the state’s anti-abortion law.

Critics frame it as a power grab that threatens the independence of the judiciary and the principle of prosecutorial discretion, the leeway that prosecutors have to follow their legal judgment.

The law passed mostly along party lines earlier this year at the urging of Gov. Brian Kemp, who said “far-left prosecutors are making our communities less safe.” Kemp and others railed against “rogue prosecutors,” invoking the cases of district attorneys from both parties.

At the time, advocates for the bill avoided mentioning Fulton County District Attorney Fani Willis, who was developing her sprawling case against Trump and has since brought election-interference charges against the former president and 18 other defendants.

Almost as soon as the ink was dry on the 41-count indictment, pro-Trump Republicans said the commission should investigate Willis when it begins accepting complaints in October. State Sen. Clint Dixon, a Buford Republican, appealed to supporters to file complaints against Willis, saying it’s “our best measure” to punish her for initiating criminal charges against the former president.

Kemp, by contrast, warned Trump loyalists against using the commission to investigate Willis. He said he’s seen no evidence Willis violated her oath of office, and urged against “engaging in political theater that only inflames the emotions of the moment.”

Last month four district attorneys filed a lawsuit saying the law violates the separation of powers between the legislative and judicial branches under the Georgia Constitution, restricts the free speech rights of prosecutors under the state and federal constitution, and provides for disciplining prosecutors under standards so vague as to deprive them of due process rights.

Willis’ name did not come up at Friday’s hearing. But Rosenthal argued that local prosecutors are already changing their stated policies in response to the law. One example: Jonathan Adams, the Republican district attorney in Butts, Lamar and Monroe counties, has withdrawn a policy that he will not prosecute adultery — a misdemeanor under Georgia law.

“There is now a body second-guessing every exercise of discretion, applying uncertain standards,” Rosenthal said at Friday’s hearing.

Belinfante argued the new commission is authorized by the Georgia Constitution. He said judges are already subject to discipline from the state’s Judicial Qualifications Commission. And he noted Democrats have supported similar bills that sought to discipline prosecutors.

“It seems to be a misnomer that this is some partisan witch hunt against prosecutors,” Belinfante said.

The prosecutors asked Judge Paige Reese Whitaker to grant their motion for an injunction that would prohibit the new commission from conducting investigations or disciplinary proceedings until the litigation is resolved. Whitaker said she plans to rule in the next week to 10 days.