As voters cast their vote for the next US president, they may be tempted to snap a selfie with their ballot, but depending on where they are, taking a selfie in the voting booth may not be legal. Taking a photo in a voting booth is currently legal in just 21 states and Washington DC, while the act is explicitly illegal in another 16 states. However, in 13 states, the laws regarding ballot selfies are still unclear.

Residents in the following states can take selfies with their ballots without worrying about legal repercussions: Connecticut, Hawaii, Idaho, Indiana, Kentucky, Louisiana, Maine, Massachusetts, Michigan, Minnesota, Montana, Nebraska, New Hampshire, North Dakota, Oregon, Rhode Island, Utah, Vermont, Virginia, Washington, Washington DC and Wyoming.

While taking a selfie of your own ballot is legal in all these states, taking a photo of another voter's ballot is illegal in Utah. The Associated Press reported that officials in Louisiana and Washington are not fond of ballot selfies.

However, voters in the following states should not take selfies with their ballots as it is illegal: Alabama, Alaska, Colorado, Florida, Georgia, Illinois, Kansas, Mississippi, Nevada, New Jersey, New Mexico, New York, North Carolina, South Carolina, South Dakota and Wisconsin.

In the remaining 13 states— Arizona, Arkansas, California, Delaware, Iowa, Maryland, Missouri, Ohio, Oklahoma, Pennsylvania, Tennessee, Texas and West Virginia—the law remains unclear and changes according to each specific state, according to Vox. Laws in these states widely differ, from banning photography specifically in the polling place, to prohibiting electronic devices at stations altogether.

Singer Justin Timberlake became the subject of a short-lived investigation in his home state of Tennessee after posting his own ballot selfie to encourage fans to vote. According to The Commercial Appeal, Vince Higgins, communications director for the office of Shelby County District Attorney General Amy Weirich, said he was wrong in saying Timberlake's selfie was under review in Memphis.

"The statement released earlier today by my office regarding Justin Timberlake and an investigation was incorrect and was released without my knowledge," Weirich said in a statement on Tuesday (25 October). "I am out of town at a conference. No one in our office is currently investigating this matter nor will we be using our limited resources to do so."

IBTimes UK breaks down what the law allows in these 13 states.

  • Arizona: Photography banned within 75 feet of polling places. However, sharing early ballots on social media is allowed.
  • Arkansas: State law on sharing voting choice is unclear.
  • California: The ban on ballot selfies will be repealed after the 8 November election, however, the current law is not strictly enforced.
  • Delaware: No cellphones allowed in the voting booth, but the law is not strictly enforced.
  • Iowa: Electronic devices are not allowed in the voting booth, however, photos of absentee ballots are allowed.
  • Maryland: Electronic devices are not allowed in polling places except for the media. Neither voters nor the media are allowed to photograph voters' ballots. Photographing mailed ballots is allowed.
  • Missouri: Voters banned from showing their ballots to others, but ballot selfies are a "grey area".
  • Ohio: Voters banned from showing their ballots to others, but restrictions on ballot selfies are unclear.
  • Oklahoma: A 40-year-old law bans ballot selfies but there are no penalties.
  • Pennsylvania: Voters banned from showing others how they are "about to vote".
  • Tennessee: Voters banned from taking photography at polling places, but photos of mail-in ballots are unclear.
  • Texas: Photography banned within 100 feet of polling places. Photos of mail-in ballots are allowed.
  • West Virginia: Electronic devices are not allowed inside voting booths. Photos of mail-in ballots are not regulated by the law.