The razor-thin Arizona attorney general race tightened even further on Thursday following an automatic recount, but the results pave the way for the Democratic candidate to be certified as the winner.

Democrat Kris Mayes led Republican Abe Hamadeh by just 280 votes out of more than 2.5 million ballots cast following the recount, a gap of 0.01 percentage points that marks one of the closest contests in the state’s history.

The state’s canvass earlier this month had shown Mayes leading by 511 votes, triggering an automatic recount under Arizona law for the attorney general contest and two other races close enough to fall within the threshold.

An Arizona judge ordered counties to keep the recount results confidential until Thursday’s hearing.

The updated standings tightened Mayes’s lead by nearly half, with nearly all of Hamadeh’s gain coming from Pinal County, which is located between Phoenix and Tucson. 
Pinal County’s recount reported an additional 392 votes for Hamadeh and 115 votes for Mayes, while other jurisdictions reported smaller-scale adjustments. The county attributed the previous undercount to human error as they vowed to continue investigating.

“The purpose of a recount is to ensure accurate vote totals are put forth, as it is reasonable to expect some level of human error in a dynamic, high-stress, deadline intensive process involving counting hundreds of thousands of ballots,” the county said in a statement.

As rumors grew of the discrepancy in the hours prior to the judge’s announcement, Hamadeh on Thursday asked the judge for a delay and requested the current attorney general, Republican Mark Brnovich, remain in office until “all issues are resolved.”

The judge on Thursday rejected the motion.

Hamadeh had cited Arizona’s 1990 gubernatorial race, when the sitting governor remained in office through the March following the election until a successor was certified as the winner.

That delay occurred because Arizona’s constitution at the time required a candidate to receive a majority of votes to be elected. No candidate received a majority in the general election, so officials scheduled a runoff more than three months after Election Day and delayed the certification of a winner.

The judge on Thursday declared that Mayes had received the highest number of votes in the race, and Arizona law instructs the judge to deliver a copy of Thursday’s order to Secretary of State Katie Hobbs (D), who is also governor-elect. The statute further instructs Hobbs to subsequently issue a certificate of election to Mayes.

“A shockingly high discrepancy,” Hamadeh wrote on Twitter. “Again, a recount just puts the ballots in the machine again. My legal team will be assessing our options to make sure every vote is counted.”

Hamadeh had formally contested his race’s result following the state canvass, but a judge threw out his challenge on Friday, ruling that he did not prove his case of mistakes in the election process impacting the outcome. 

Republican National Committee Chairwoman Ronna McDaniel said her group continues to support Hamadeh’s efforts. The RNC had joined Hamadeh’s election lawsuit while staying out of other Arizona GOP candidates’ challenges to their results.

“What’s the explanation for why these votes were missed at first? That discrepancy is shocking, especially since a recount just puts the ballots through the machines again,” McDaniel wrote on Twitter.

The recount results were originally scheduled to be announced last week, but the judge overseeing the recount delayed the proceeding as Hamadeh proceeded with his challenge.

Thursday’s results also affirmed Republican Tom Horne’s victory in the race for superintendent of public instruction, although Democrat Kathy Hoffman previously conceded the race after trailing Horne by nearly 9,000 votes in the earlier canvass.

Horne increased his lead by 221 votes in the recount.

A state legislative seat in the Phoenix area also went to an automatic recount after Republican Liz Harris led Republican Julie Willoughby by 270 votes. The updated standings added a net gain of five votes to Harris’s lead, affirming her victory.

—Updated at 5:32 p.m.