Leo Glickman, who represents the trio of plaintiffs, asked Judge P. Kevin Castel to issue a court order blocking the Board of Elections and other officials from enforcing the state statue, saying it would have no effect on Election Day operations.

“What the Board of Elections is doing is shutting down free speech outside the polling site with this restriction,” Glickman argued.

Schwartz and Stephen Kitzinger, a lawyer for the city, underscored the filing of the lawsuit less than two weeks before Election Day next Tuesday.

At one point, he also noted the iPhone came out in 2007 and that “selfies have been a thing, in my opinion, for far too long,” drawing laughter from the audience and the judge.

Castel said he would rule by the end of the week.

Outside the courtroom, plaintiff Jennifer Rebecca White, of Bay Ridge, Brooklyn, said the issue wasn’t just about snapping a photo of herself in the booth.

“My concern is being able to document my ballot,” she said in the event of an irregularity or problem.

Eve Silberberg, who is also suing, shut down the notion that pictures would cause delays.

“People are more familiar with their cameras than the voting process,” said Silberberg, who lives in the West Village. “Photographing ballots won’t hamper the process as much as the process itself.”