Kris Mayes, the Democratic candidate for attorney general in Arizona, prevailed on Thursday in a recount by a razor-thin margin over Abraham Hamadeh, a Republican, bringing clarity to one of the last undecided races of the midterms.
The margin of victory for Ms. Mayes was 280 votes out of about 2.5 million ballots cast in the November election, said Judge Timothy J. Thomason of the Maricopa County Superior Court, who announced the recount’s results in a brief judicial hearing. The recount reduced the margin between the two candidates by about half, with the Election Day results showing Mr. Hamadeh trailing Ms. Mayes by 511 votes.
Mr. Hamadeh, whose legal effort to have himself declared the winner was dismissed by a judge on Friday, continued to sow doubt in the election results, saying in a post on Twitter that “we must get to the bottom of this election” and calling for ballots to be inspected.
But during closing arguments in last week’s trial, Mr. Hamadeh’s lawyer, Timothy La Sota, acknowledged that he did not have any evidence of intentional misconduct or any vote discrepancies that would make up the gap between the candidates.
On Thursday, Ms. Mayes shared a photo of her certificate of election on Twitter and issued a statement about the recount results, saying that “democracy is truly a team sport” and that she was ready to get to work as attorney general.
The recount was conducted by county election officials, who reported their results to the secretary of state, Katie Hobbs, a Democrat. She won the governor’s race last month against the Kari Lake, a Republican election denier who continues to dispute her defeat.
The outcome of the attorney general’s contest dealt another blow to Republicans in a state where the party entered the midterms with heightened expectations of creating a red wave by seizing on high inflation and the flagging job approval numbers of President Biden.
That perceived advantage turned out to be a mirage, with Democrats winning most of the marquee statewide offices.
Election deniers pointed to technical glitches on Election Day, which disrupted some ballot counting in Arizona’s most populous county, Maricopa, to fuel conspiracy theories and baseless claims. Mr. Hamadeh and Ms. Lake contended that the election had been compromised.
But election officials in Maricopa County, which is led by Republicans, have defended the voting process and said that there was no evidence that voters were turned away from casting ballots.
Alexandra Berzon contributed reporting.