He may have thought he was bringing sexy back to the polling booth, but Justin Timberlake could be looking at a jail sentence after taking a selfie while casting his vote in Memphis, Tennessee.

The singer flew from Los Angeles to vote at New Bethel Missionary Baptist church in Germantown, and shared a picture of himself doing it on Instagram, with an exhortation to followers to “get out and vote”.

Unfortunately, this display of civic-mindedness was marred by the fact that the taking of photographs or video in the voting booth was made illegal in May 2015, when the Tennessee governor, Bill Haslam, passed a statewide bill specifying that cellphones must only be used in polling stations for “informational purposes to assist the voter in making election decisions”. It is also forbidden to make calls from the voting booth.

Penalties can include a $50 fine and 30 days in jail. Timberlake may soon be crying a river, as a spokesperson for the Shelby County district attorney’s office told TMZ that it was “made aware of a possible violation of election law” and that the matter was being reviewed.

The Tennessee secretary of state’s office spokesman Adam Ghassemi took the pop star infraction as an opportunity to remind the state’s voters of the law, telling the local news site the Commercial Appeal: “We’re thrilled Justin can’t stop the feeling when it comes to voting so much that he voted early in person and is promoting voting to his millions of fans. In Tennessee, using electronic devices inside polling locations to take pictures, videos or make calls is not allowed. We hope this encourages more people than ever to vote, but Tennesseans should only use their phones inside polling locations for informational purposes to assist while voting. If polling officials discover someone violating this law they will ask the voter to put their phone away.”

It is not known how Timberlake voted, but he and his wife, Jessica Biel, recently stepped in to host a Hollywood fundraiser for Hillary Clinton after Leonardo DiCaprio dropped out. Which suggests he prefers the candidate in the pantsuit to the one in the Suit and Tie.