PHOENIX (AP) — A federal judge refused Friday to require that Arizona officials count ballots by hand in November, dismissing a lawsuit filed by the Republican nominees for governor and secretary of state based on false claims of problems with vote-counting machines.

Kari Lake, who is running for governor, and Mark Finchem, a secretary of state candidate, won their GOP primaries after aggressively promoting the narrative that the 2020 election was marred by fraud or widespread irregularities.

Their lawsuit repeated unfounded allegations about the security of machines that count votes. They relied in part on testimony from Donald Trump supporters who led a discredited review of the election in Maricopa County, including Doug Logan, the CEO of Cyber Ninjas, who oversaw the effort described by supporters as a “forensic audit.”

U.S. District Judge John Tuchi ruled that Lake and Finchem lack standing to sue because they failed to show any realistic likelihood of harm and that their lawsuit must be brought in state, not federal, court. He also ruled that it is too close to the election to upend the process.

“The 2022 Midterm Elections are set to take place on November 8,” Tuchi wrote. “In the meantime, Plaintiffs request a complete overhaul of Arizona’s election procedures.”

Finchem said he’s evaluating his next step.

“The so-called ‘lack of standing’ seems to be a catchall for dismissing things that the court would rather not have to rule on,” Finchem wrote in a text message. “If we don’t have standing, then who does?”

A spokesman for Lake, Ross Trumble, said he hadn’t seen the ruling and wasn’t prepared to comment.

The lawsuit was filed against Secretary of State Katie Hobbs, the Democratic nominee for governor, and the elected supervisors of Maricopa and Pima counties, who oversee elections in the Phoenix and Tucson metro areas.

Lawyers for Lake and Finchem said hand counts are the most efficient method for totaling election results. They said the lawsuit wasn’t about undoing the 2020 presidential election results in Arizona, but rather about the upcoming election.

Election administrators testified that hand counting dozens of races on millions of ballots would require an extraordinary amount of time, space and manpower, and would be less accurate. They said extensive reviews have confirmed that vote-counting machines in Maricopa County are not connected to the internet and haven’t been hacked.

Federal and state election officials and Trump’s own attorney general have said there is no credible evidence the 2020 election was tainted. Trump’s allegations of fraud were also roundly rejected by courts, including by judges he appointed. A hand recount led by Cyber Ninjas in Maricopa County found no proof of a stolen election and concluded Joe Biden’s margin of victory was larger than the official count.

The Maricopa County Board of Supervisors, which is controlled 4-1 by Republicans, asked the court to sanction attorneys for Lake and Finchem and force them to pay the county’s legal fees. The attorneys should have known their complaint was based on frivolous information, wrote Emily Craiger, a lawyer for the county.

Lake, Finchem and their lawyers used the court “to further a disinformation campaign and false narrative concerning the integrity of the election process,” she wrote.

The lawyers for Lake and Finchem responded that their claims are “legally sound and supported by strong evidence.” Their brief was signed by attorneys Andrew Parker of Minneapolis, Kurt Olsen of Washington and Alan Dershowitz, a well-known former Harvard Law School professor.

The judge did not rule on the request for sanctions.