A federal district court struck down a New Hampshire law Tuesday that made it illegal for voters to take so-called “ballot selfies.”

The law, which was passed in 2012, made taking a picture of a marked ballot a violation punishable by up to a $1,000 fine.

The law was ruled unconstitutional in response to a lawsuit brought by the American Civil Liberties Union of New Hampshire. The suit was filed on behalf of three people who were under investigation by the state attorney general’s office for taking photos during the 2014 Republican primary and posting them on social media. At least two of the plaintiffs deliberately violated the law to protest it.

Lawmakers who passed the law claimed it was necessary to prevent voters from selling votes and to protect voters from being coerced into voting a certain way.

However, Tuesday’s ruling points out that the lawmakers were only able to identify a single unverified rumor of vote buying and were unsure if photography was involved.

According to the ruling, state representative Mary Till explained the rumor this way:

I was told by a Goffstown resident that he knew for a fact that one of the major parties paid students from St. Anselm’s $50 to vote in the 2012 election I don’t know whether that is true or not, but I do know that if I were going to pay someone to vote in a particular way, I would want proof that they actually voted that way.

None of the three plaintiffs in the case were accused of selling votes nor had any of them been coerced into voting a certain way.

Representative Leon Rideout's ballot.

Representative Leon Rideout’s ballot.

In fact, one of the plaintiffs was state representative Leon Rideout, who had voted for himself in the primary.

Plaintiff Brandon Ross, an attorney associated with the libertarian Free State Project, also voted for himself.

And plaintiff Andrew Langois wrote in the name of his deceased dog Akira because he didn’t approve of any of the candidates.

The court concluded that the law was unconstitutional because it was a “content-based restriction on speech” that was not designed to address an actual problem. According to the ruling:

[E]ven though small cameras capable of taking photographic images of ballots have been available for decades and cell phones equipped with digital cameras have been in use for nearly 15 years, the [state] has failed to identify a single instance anywhere in the United States in which a credible claim has been made that digital or photographic images of completed ballots have been used to facilitate vote buying or voter coercion.

The ruling also found that the law was not “narrowly tailored.” According to the ruling:

As the complaints of the voters who are now under investigation reveal, the people who are most likely to be ensnared by the new law are those who wish to use the images of their completed ballots to make a political point. The few who might be drawn into efforts to buy or coerce their voted are highly unlikely to broadcast their intentions via social media given the criminal nature of the schemes in which they have become involved. As a result, investigative efforts will naturally tend to focus on the low-hanging fruit of innocent voters who simply want the world to know how they have voted for entirely legitimate reasons.

ACLU-NH Legal Director Gilles Bissonnette praised the ruling in a press release issued on Tuesday.

“Today’s decision is a victory for the First Amendment. Political speech is essential to a functioning democracy. The First Amendment does not allow the State to, as it was doing here, broadly ban innocent political speech with the hope that such a sweeping ban would address underlying criminal conduct,” she said.

“What this law ignored, and what the Court recognized, is that displaying a photograph of a marked ballot on the Internet is a powerful form of political speech that conveys various constitutionally-protected messages. This form of speech, for example, can convey a sense of pride from an 18-year-old, newly-minted voter who is enthusiastic about voting in her first presidential selection. This message loses its salience without the photograph of the marked ballot.”

But New Hampshire Secretary of State William Gardner, who was named as the defendant in the lawsuit, told the Union Leader that he stood by the law.

“I don’t like the idea of people taking photos inside the polling area,” he said. “I think the law did a good job of preventing it.”

I guess it’s a good thing we have a First Amendment that prevents people like Gardner from banning speech just because they don’t like it.

UPDATE: Brandon Ross, one of the plaintiffs in the lawsuit, sent the following statement:

I’m pleased with Judge Barbadoro’s ruling. It was very thorough. But applying common sense, I don’t think the conclusion was that surprising either–and that’s what troubles me. I fear the law was passed by the weight of the Secretary of State’s office, without much concern about the constitutional issues raised. I hope this reminds our legislators not to brush off citizen’s concerns–and not to go searching for “solutions” to problems which don’t exist.

I was very surprised to learn that the sponsor of the bill was the one who reported me to the Attorney General’s office. Something about that is deeply unsettling. But then again, I literally asked for it.

Ross had posted a picture of his ballot on Facebook, saying “Come at me, bro,” which is what prompted the attorney general to begin investigating him.