People post selfies with their strawberry daiquiris and their calico kittens, with strangers and friends, with and without clothes. So it was inevitable, perhaps, that some might take photographs inside the voting booth to show off their completed ballots.

Excited first-time voters; those proud to show that they voted for or against, say, President Obama; and those so disgusted that they wrote in the name of their dead dog have all been known to post snapshots of their ballots on Twitter or Facebook.

Now, a legal fracas has erupted over whether the display of marked ballots is a constitutionally protected form of speech and political expression — as a federal court in New Hampshire declared this month, overturning a ban on such photographs — or a threat to the hallowed secret ballot that could bring a new era of vote-buying and voter intimidation.

The New Hampshire case is unlikely to be the last to grapple with what are commonly called ballot selfies, whether they include an image of the phone user or not. Numerous states have laws to protect voter secrecy, drafted in an earlier era, that could be construed to ban ballot photographs, said Gilles Bissonnette, the legal director of the American Civil Liberties Union of New Hampshire, which challenged the New Hampshire ban.