A federal court says outlawing "ballot selfies," photos of people displaying their marked ballots, violates free speech rights.

The ruling clears the way for New Hampshire voters to post their ballot selfies during the first-in-the-nation presidential primaries early next year.

New Hampshire's ban went into effect September 2014 and made it illegal for anyone to post a photo of a marked ballot and share it on social media. The violation was punishable by a fine of up to $1,000.

New Hampshire Public Radio's Josh Rogers tells NPR's Newscast:

"The logic was that allowing people to prove how they voted could lead to vote selling or coercion. The federal court found those interests insufficient to ban what amounted to political speech."

Mashable's Juana Summers adds that the judge found "there was no evidence that vote-buying or voter coercion were current problems in New Hampshire."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.