The Democrat-led Legislature and Democratic Gov. Phil Murphy enacted the measure this year intending to require certain advocacy groups to disclose their donors.

They cited state election law-enforcement reports indicating ever-rising amounts of undisclosed cash involved in state politics.

But the law runs afoul of the Constitution and could lead to a chill on First Amendment rights by deterring potential contributions to organizations, argued Americans for Prosperity.

The measure required political organizations and some nonprofits to disclose all spending over $3,000, up from $1,600. It also mandated that contributors giving more than $10,000 would be disclosed.

The state argued that the bill simply aimed at uncovering who was “pulling the strings” in politics, but Martinotti took issue with language in the measure. Specifically, he questioned how the law made merely factual political information subject to disclosure.

“Most constitutionally troubling to the Court is the way in which…the Act brings communications of purely factual political information into a disclosure and financial-reporting regime historically limited to electioneering communications,” he wrote.

Historically, disclosure applied to so-called electioneering messages, which amount to pleas for voters to elect a specific candidate.