“It’s not allowed,” Nikki Baines Charlson, deputy administrator of elections for Maryland, told The Baltimore Sun. “Voters can’t use electronic devices in the polling place. When you’re outside the voting room, that’s fine. When you enter the room, all electronic devices need to be put away.”

And while children are allowed inside voting booths, they are not permitted to fill out a ballot, she said.

Ms. Charlson said she did not know the possible penalty for a violation. She said officials were researching the matter, The Sun reported.

Mrs. Mosby isn’t the first to make the “ballot selfie” mistake this election season. Donald Trump’s 32-year-old son Eric Trump tweeted, then deleted a photo of part of his completed ballot, which he cast in New York City on Tuesday. The issue sparked a widespread debate late last month after Justin Timberlake took a photo of himself at a voting booth in Memphis, Tennessee. Officials declined to investigate the matter.