PHOENIX — The question of whether the Trump campaign gets a chance to try to prove the president actually got more votes than have been tallied — and ultimately whether he gets Arizona’s 11 electoral votes — could depend on a video taken illegally in a polling center.

Attorney Kory Langhofer told Maricopa County Superior Court Judge Daniel Kiley on Tuesday he has a video of a poll worker “doing it wrong.’’ He said that backs up the contention of the president and the state and national Republican committees that there are votes not properly recorded, some of which they believe would benefit GOP candidates.

Langhofer, who represents the Trump re-election committee and the state and national Republican parties, was careful to say that neither he nor his clients authorized the video.

“I wouldn’t have signed off on it,’’ he said.

“But now that it exists and it shows the poll worker pressing the green button, that’s relevant evidence,’’ Langhofer said. “And I don’t see why it’s not admissible.’’

Assistant Maricopa County Attorney Tom Liddy said it’s a crime to take videos or photos inside a polling place. That, he told Kiley, makes its use by Langhofer illegal.

The most recent figures have the president trailing Democrat Joe Biden, but by fewer than 13,000 votes. With fewer than 47,000 votes left to be tabulated, Trump would need to pick up close to two out of every three remaining to take the lead.

He has done that well in some rural counties.

But the lion’s share of the uncounted votes are in Maricopa and Pima counties, and while day-of voting there has tended to favor the president, the margins have not matched what he needs.

The update from Pima County on Tuesday afternoon, the first since last week, gave Trump just 50.6% of the 7,142 votes tallied, against 46.9% for Biden.

The most recent Maricopa County addition of 5,291 votes late Tuesday swung 56.4% for Trump and 41.8% for Biden.

Those kinds of results could make the outcome of this litigation — and whether some ballots go through a hand count to look for unrecorded votes — crucial to who wins Arizona.

In Cochise County, write-in candidate ballots for city council seats in both Sierra Vista and Huachuca City were tallied Tuesday afternoon and candidate Gregory L. Johnson became Sierra Vista’s third city council member with 1,048 votes. The second highest vote getter among the four write-in candidates was Kathy Boston who garnered 982 votes.

Write-in candidates were required to get 696 votes to win the election.

In Huachuca City, write-in candidate Jean Post received only 19 votes.

Cochise County Elections Supervisor Lisa Marra said the remaining ballots for the county and municipalities — provisional ballots and ballots that must be signature-cured — will be updated on Thursday afternoon. Once those ballots are included in the tally, the results will be final.

Langhofer claims that “up to thousands’’ of Maricopa County voters had their ballots rejected by automatic tabulation devices at polling centers. This can occur due to anything from stray marks on the ballot to “over voting,’’ meaning filling in too many ovals in any particular race.

He said these voters should have been given a choice of either submitting a new ballot or putting the one they filled out into a special tray where it would be further examined by hand to determine the intent of the voter. Instead, he alleges, poll workers induced voters to “press the green button’’ on the tabulator, meaning the ballot would be submitted without manual review — and any races affected by an overvote or other defect would not be counted.

That’s where the video could prove relevant, showing Kiley how the problem occurred.

Liddy said it is a misdemeanor to take photos or videos not just inside of polling places but within the 75-foot perimeter around each one.

“Some folks have gone in and violated the law by filming voters inside the polling place,’’ he told the judge. “There is no way the Maricopa County attorney can agree to allow the fruits of that illegal activity to be used as a weapon in a civil case when it violates criminal law.’’

It was not disclosed who shot the video or where it was taken.

Kiley put off a decision on its admissibility until Thursday’s trial. But if he agrees to allow it in, that creates a problem for whoever shot it.

Rules of evidence generally prohibit the introduction of documents, photos or videos unless someone first testifies about their authenticity. If Langhofer tries to use the video at trial it would require the person who shot it to take the stand — and essentially confess to committing a crime.

There’s another issue: Who gets to see it.

“I’m uncomfortable with the idea of having a video that shows people’s faces, voted ballots or visible who they voted for,’’ Langhofer said. “So it seems to me like sealing it is appropriate.’’

That’s not acceptable to Liddy.

“The people have a right to know that their election is honest and fair and accurate,’’ he told the judge.

“And the last thing we need is green fleshy food for the beast of the conspiracy theorists that there was this secret evidence and a secret court hearing and that’s how we resolve this issue and the people never get to know,’’ Liddy continued. “Whatever evidence there is needs to be shared with the people.’’