PHOENIX (AP) — A judge has thrown out Republican Abraham Hamadeh’s challenge of election results in his race against Democrat Kris Mayes for Arizona attorney general, concluding that Hamadeh didn’t prove the errors in vote counting that he had alleged.

The ruling on Friday by Mohave County Superior Court Judge Lee Jantzen came after Hamadeh’s attorney, Tim La Sota, acknowledged his client hadn’t gained enough votes during his litigation to change the outcome of the race. Mayes finished 511 votes ahead of Hamadeh out of 2.5 million in one of the closest elections in state history.

“You haven’t met the burden,” Jantzen told La Sota shortly before ruling against Hamadeh.

As part of the litigation, the parties in the case were allowed to inspect a sample of 2,300 ballots. Through the inspection, Hamadeh said he gained a net six votes, while Mayes maintained she netted three votes.

“If you extrapolate the numbers, they are not going to get us to 511 votes if you take the sample we have,” said La Sota, who had pushed for a larger sample size.

Hamadeh, whose race is the subject of a separate automatic recount conducted by the state due the close results, complained in a tweet about election operations in Maricopa County and said his team “will await the results of the recount before deciding our next steps.”

Andrew Gaona, an attorney representing Secretary of State Katie Hobbs, said the lawsuit was a “spectacular waste of everyone’s time.”

Under Arizona law, Hamadeh faced the high bar of proving not just that election officials erred but that he would have won without their misconduct.

In his lawsuit he alleged that problems with printers in Maricopa County led to a series of issues that disenfranchised voters. He also alleges his race was affected by improper handling of ballots that were duplicated or adjudicated by people because they could not be read by tabulators.

Dan Barr, an attorney representing Mayes, said Hamadeh didn’t present evidence to his claims. “What on earth are we doing here?” Barr asked during closing arguments. “People can’t file complaints (over elections) with no facts.”

A court hearing is scheduled Thursday to present results of recounts in the races for attorney general, state superintendent and for a state legislative seat.

Another judge is considering Republican Kari Lake’s challenge of her loss to Hobbs in the governor’s race. ___

This story has been corrected to show that the attorney general’s race will be part of a hearing Thursday, not in another hearing that has yet to be scheduled.