Upholding a lower court ruling
, the Boston-based First Circuit Court of Appeals called the 2014 law an overreaction to an unsubstantiated concern. Its application, Judge Sandra Lynch wrote, quoting from a 1957 Supreme Court ruling, was like "burning down the house to roast the pig."
State lawmakers had argued both in framing and defending the law that digital images of ballots could be used to aid in schemes to coerce or buy votes.
But the court dismissed the suggestion for a lack of evidence.
"Digital photography, the Internet, and social media are not unknown quantities -- they have been ubiquitous for several election cycles, without being shown to have the effect of furthering vote buying or voter intimidation," the decision said.
The ruling was a win for Snapchat, the photo- and video-sharing app, which filed an amicus brief in support of a suit initially brought by the American Civil Liberties Union on behalf of three people who came under investigation for allegedly violating the statute.
In its filing to the court, Snapchat argued
that ballot selfies are like "campaign buttons" -- a means of "express(ing) support for or against a cause or a candidate."
In a 2015 court document, the state had said that a challenge to the law struck at the state legislature's "authority" to revise a pre-existing law as part of a process to "protect the purity and integrity of the state's election process in light of the leaps and bounds of technology over the past century."
But the free speech argument ultimately prevailed, with the court declaring "that the statute at issue here is facially unconstitutional even applying only intermediate scrutiny. ... There is a substantial mismatch between New Hampshire's objectives and the ballot-selfie prohibition."
The Reporters Committee for Freedom of the Press, the Keene Sentinel and the New England First Amendment Coalition also filed briefs in opposition to the law.
Gilles Bissonnette, the legal director of the ACLU-NH, called the decision
a "victory for the First Amendment" and chided the state for attempting to "broadly ban innocent political speech with the hope that such a sweeping ban will address underlying criminal conduct."
The New Hampshire state attorney general's office told CNN on Thursday it was still "reviewing the decision" and had not yet determined if there was grounds for a further appeal.