PHOENIX — The attorney for the Arizona Republican Party is telling a judge that he is treading on First Amendment rights if he imposes sanctions on his client for bringing what the judge called a “meritless” lawsuit over the just-competed election.

“Public mistrust following this election motivated this lawsuit, and there is absolutely nothing improper or harassing about that,” Jack Wilenchik told Maricopa County Superior Court Judge John Hannah. He said forcing those who bring such actions to pay the other side’s legal fees, even if the cases are ultimately thrown out of court, effectively silences those who exercise their constitutional rights to challenge the results.

And Wilenchik said just the fact it is being considered shows not just “a degree of bias” by Hannah but also that that the judge is ignoring the feelings of perhaps a third of all voters who believe that results of the general election are not legitimate.

The dispute is what’s left of a bid by the state GOP to force a different method of conducting the legally required random hand count of ballots. That procedures has officials from both parties select a batch of ballots and races within those ballots to determine if what the machine tallied matches what humans concluded.

In all cases, the match was 100%.

Wilenchik, representing the Republicans, charged the law requires audits to be conducted at 2% of voting precincts.

Only thing is, Maricopa County — and six others — use voting centers where any individual can go to cast a ballot. So the audit was conducted at 2% of these vote centers. And Hannah ruled that when legislators allows counties to establish vote centers they gave the secretary of state the power, through the official Election Procedures Manual, to allow audits in that method.

But Hannah did more than dismiss the case.

He called it “meritless” and invited Roopali Desai, the private attorney hired by Secretary of State Katie Hobbs, to seek her legal fees. And that, said Hannah, will require him to decide “whether the Republican Party and its attorneys brought the case in bad faith to delay certification of the election or to cast false shadows on the election’s legitimacy.”

Roopali did that, seeking $18,238. Now Wilenchik is telling the judge to reject that bid.

“Plaintiff’s action was based on a thoughtful, well-reasoned, and well-supported position on the law,” he wrote. And he said there is no evidence that the party brought the case in bad faith.

But Wilenchik, in his legal filings, also is going on the offensive, suggesting it is wrong for Hannah to even consider awarding legal fees.

“There is a degree of bias in the way that the court frames the issue,” he said, specifically complaining about Hannah saying that the issue of fees will turn on whether the lawsuit was brought “to cast false shadows on the election’s legitimacy.”

“The court has apparently concluded, even though it was not an issue to be litigated in this suit, that it would be ‘false’ — and even constitute harassment — to doubt the legitimacy of this election,” Wilenchik wrote. “This puts the court at odds with around a third of the general population, and around half of the Republican Party in this state,” he continued, citing various polls.

And Wilenchik had a warning for the judge.

“The court is troublingly close to engaging in very serious interference with the First Amendment right to petition government for a redress of grievances, by equating a widely held political belief with mere ‘harassment,’ and threatening to impose sanctions and oppress that belief,” he wrote. That, said Wilenchik, would be like sanctioning someone who “cast false shadows on the legitimacy of gun rights.”

The bottom line, he told Hannah, is that “public mistrust” following the election is what motivated the lawsuit.

“There is absolutely nothing improper or harassing about that,” he said.

“Courts are intended to be a forum for airing democratic grievances and safeguarding the integrity of elections,” Wilenchik continued. “These goals are not well service when courts are openly hostile to anyone who dares to even question an election, much less when courts equate widely held political beliefs to mere ‘harassment.’ “

It wasn’t just Desai fighting the lawsuit filed by the state GOP.

Wilenchik also had sued the Maricopa County Board of Supervisors and County Recorder Adrian Fontes. But they were represented in court by the county attorney’s office which did not seek reimbursement of its costs.

Hannah has not said when he will rule on the issue.