BOSTON — When state Rep. Brian Mannal noticed fliers 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 fliers, 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 flier – 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 flier paid for by the Jobs First PAC easily crossed the line.

The flier pointed to a Mannal bill that would have notified indigent sex offenders of their right to a public defender. The flier 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 flier amounted to opinion, not fact. The law, however, is critical to helping the state protect elections from fraud, she 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 flier 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.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 are 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.”