BOSTON (AP) — When state Rep. Brian Mannal noticed flyers accusing him of putting the interests of sex offenders over families last year, the Barnstable Democrat saw more than just the rough and tumble of Massachusetts politics.

The flyers, Mannal said, broke the law.

Just weeks before Election Day, Mannal sought a criminal complaint against the treasurer of the political action committee responsible for the flyer — Melissa Lucas — citing a 1946 state law barring the publishing of false statements about candidates designed to affect their election chances.

On Thursday, the state’s highest court will hear arguments about whether the law violates the First Amendment right to free speech.

The case is galvanizing a range of groups — from the libertarian Cato Institute and the American Civil Liberties Union to local newspaper publishers — each of which filed briefs with the Supreme Judicial Court, urging it to rule the law unconstitutional because they say it restricts free speech.

Attorney General Maura Healey’s office is defending the law, arguing it helps the state safeguard elections from deliberately fraudulent statements meant to skew the outcome. At the same time, Healey’s office says the law doesn’t apply in this case.

For Mannal, the flyer paid for by the Jobs First PAC easily crossed the line.

The flyer pointed to a Mannal bill that would have notified indigent sex offenders of their right to a public defender. The flyer said Mannal “wants to use our tax dollars to pay defense attorneys like himself to help convicted sex offenders.”

Mannal says he’s not certified to handle sex offender cases.

“They intended to mislead and confuse voters about my character … to effectively steal an election,” Mannal said.

Assistant Attorney General Amy Spector urged the court to uphold the law but dismiss the charges against Lucas.

Spector said the language on the flyer amounted to opinion, not fact. The law, however, is critical to helping the state protect elections from fraud, she wrote.

“The statute directly serves the Commonwealth’s interest in preserving the integrity of elections by punishing verifiably false factual statements that are designed to, or tend to, influence votes in an election,” Spector wrote.

A lawyer for Lucas, Peter Charles Horstmann, declined to comment and said he’s advised Lucas against commenting publicly.

In a brief filed with the court, however, Horstmann argues Lucas had no role in drafting or distributing the brochures. He also argues that the law violates First Amendment protections of free speech and is “constitutionally overbroad, vague and seeks to regulate protected opinion.”

Even if the statements on the flyer were determined to be false, Horstmann wrote, “the best remedy for false political speech is truthful speech, not state suppression.”

Horstmann also said that by filing the criminal complaint just weeks before the election, it was Mannal who chilled the free speech rights of the Jobs First PAC. He said the PAC pulled a radio ad because of Mannal’s complaint.

Mannal faced Republican Adam Chaprales, of Barnstable, in the November election.

Mannal named Lucas in the lawsuit in part because her name appeared on the PAC’s official filings with the state; the PAC was an independent group that was not allowed to coordinate with Chaprales’ campaign.

Penalties for violating the law include a fine of not more than $1,000 dollars or six months in jail.

Among those weighing in on the lawsuit is the New England First Amendment Coalition, which includes lawyers, journalists and historians.

The groups said the law could put publishers on the hook.

“Newspapers routinely carry letters to the editor, advertisements, and other forms of third-party media,” the group wrote. “Under one reading of (the law), a newspaper could be responsible for any and all falsehoods in those pieces.”

The ACLU also urged the court to rule the statute unconstitutional, warning of a chilling effect that could arise “both from the threat of criminal prosecution, penalties and associated stigma, and from the need to spend significant time and resources to respond — burdens that are apt to fall as heavily upon truthful speakers … as upon someone who knowingly makes false statements.”

Mannal won re-election to a second term by a margin of a little over 200 votes.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.