RALEIGH, N.C. (AP) — The campaign committee for North Carolina Attorney General Josh Stein, facing trouble for a TV ad aired against a rival in 2020, plans to ask a federal court to block enforcement of a state law making it illegal to knowingly circulate false reports to damage a candidate’s election chances.

The notice of appeal to the 4th U.S. Circuit Court of Appeals was filed Wednesday by the campaign’s attorney. It comes a day after a trial judge refused to bar Wake County District Attorney Lorrin Freeman from potentially using the law to prosecute anyone over the disputed commercial. Lawyers for Stein have argued the law is overly broad and chills political speech.

By challenging the state law, Stein may put himself in a bind between his public duties and his political future. Stein’s campaign committee argues that the statute is unconstitutional, noting one of the attorney general’s chief jobs is to defend North Carolina laws in court. Stein, a Democrat, is a potential 2024 governor’s contender.

The law, which dates to at least 1931, makes it illegal to knowingly circulate false “derogatory” reports about candidates to harm them at the ballot box. Freeman’s investigation stems from a September 2020 State Board of Elections complaint about the ad, which was filed against Stein’s committee by his then-challenger, Republican Jim O’Neill.

U.S. District Judge Catherine Eagles, in canceling her July 25 emergency order that had stopped the law’s enforcement, wrote Tuesday that the statute was permissible under the Constitution.

The ad talks about untested rape kits held by local law enforcement agencies, and a woman appearing in the commercial asserts that O’Neill “left 1,500 rape kits sitting on a shelf” in Forsyth County, where he’s been district attorney since 2009.

Stein’s committee and two other plaintiffs sued last month to attempt to the have the law struck down as Freeman’s office prepared to take its investigation of the commercial to a state grand jury, according to legal briefs. No one has been charged in the case, and it’s unclear who specifically would have been a possible target.

O’Neill has said the 2020 ad was false because police agencies, not prosecutors, are responsible for testing rape kits. Stein, who defeated O’Neill by fewer than 14,000 votes in November 2020, has defended the ad’s accuracy. He said it countered false accusations by O’Neill that he had failed to act on over 15,000 untested rape kits since becoming attorney general in 2017.

“The voters deserved to be informed about the differences between how my opponent and I handled this critical public safety issue,” Stein said in a statement Wednesday. “I am confident that this statute will ultimately be struck down and we will move forward.”

After a state election board investigation, the matter was forwarded to Freeman’s office, after which the State Bureau of Investigation interviewed Stein, members of his campaign staff and the woman in the ad, who also worked in the attorney general’s office, according to briefs.

Separately on Wednesday, the state Democratic Party wrote Freeman demanding that she investigate comments O’Neill made in the 2020 campaign’s final months that it alleges were also false and derogatory. Party attorney John Wallace pointed to statements O’Neill made to the media, one that he said alleged Stein had “done nothing about the rape kits” and another that alleged Stein had sued then-President Donald Trump over funding for a border wall with Mexico.

Freeman, herself a Democrat, “should apply equal protection under the law and open an investigation,” party spokesperson Kate Frauenfelder said.

In a text message, Freeman declined comment Wednesday, saying she hadn’t received the letter. Freeman recused herself from investigating Stein’s ad, leaving it with a senior assistant DA in her office. O’Neill also didn’t have a comment late Wednesday.

The law at issue is a misdemeanor offense, punishable by up to 60 days in jail with fines. Someone with an otherwise clean record would avoid active time if convicted. Time may be running out on any prosecution, as the statute of limitations on the count is two years.

Another state law says a public official convicted of the misdemeanor at issue in the lawsuit must be removed from office by a judge. This directive appears to conflict with a provision in the North Carolina Constitution in which someone like the attorney general can only be thrown out of office through impeachment and conviction by the General Assembly.