A federal judge on Tuesday said he’ll decide by week’s end whether to temporarily suspend a state law that prohibits voters from sharing their completed ballot with others — including via “selfies” on social media.

A week before voters head to the polls, U.S. District Court Judge Kevin Castel heard legal arguments in a lawsuit filed last week by three New York City voters who are asking state officials to overturn a 126-year-old law that essentially bans “ballot-selfies.” The group is also looking for the city to lift a policy barring photography inside voting venues.

Leo Glickman, a Brooklyn attorney representing the voters, argued the snapshots are a protected form of political expression under the First Amendment.

“In addition to basic free speech rights, we think this is the type of thing that gets people to vote,” Glickman said in lower Manhattan’s federal courthouse.

Attorneys for the state and city boards of election argued that changing the current restrictions so close to the election would lead to “confusion” among thousands of poll workers who would need to be notified and retrained before Nov. 8.

“Yes, the courts are going to have to iron out” ballot-selfie policies, said New York Assistant Attorney General John Schwartz. “But to make that change the week before a presidential election is going to cause havoc.”

Schwartz and Stephen Kitzinger, an attorney representing the city, also argued that allowing voters to take pictures at the voting booth would lead to delays and long lines in a presidential election year that is expected to draw high turnout. 

Castel also brought up possible delays in his remarks from the bench, noting that “you may have well-meaning people who don’t use their cellphones every day,” taking multiple rounds of photos and videos.

“Okay, I took the photo,” Castel said, imitating a prospective voter. “Now, I just want to take a very short video.”

Under state election law, it is a misdemeanor for voters to share their completed election ballot with others. Violating the rule is punishable by up to a year in jail and a $1,000 fine, according to the law.

Castel noted that the state law “has been on the books for 126 years” and was enacted at a time where “buying votes” was prevalent.

“There were laws against bribery and they were largely flouted,” Castel said. “The statute took that largely off the table because it deprived the would-be briber a mechanism of making sure they got what they paid for.”

Glickman said the law was in need of updating in a digital age where sharing milestones on social media has become routine for many voters.

After the hearing, Eve Silberberg, one of the voters who filed the lawsuit, said voters should have the right to “document” and create a record of their ballot.

“I have the right to keep my vote private, but I also have the right to make my vote public,” said Silberberg, 53, who lives in Manhattan’s West Village.