Democrat Katie Hobbs declared victory in the race for Arizona Secretary of State Friday night, 10 days after the Associated Press initially called the race for her opponent, Republican Steve Gaynor.

On Friday, Hobbs led the race with more than 15,000 votes. Arizona still had about 67,000 ballots to process.

In a statement, Hobbs thanked her supporters, volunteers, staff, and voters. "As Secretary of State, I will work to ensure that every eligible voter – Republican, Democrat, Independent, Green, Libertarian – can cast your ballot with the confidence that your vote counts and your voice matters, and do so in a way that is meaningful and convenient for you."

Governor Doug Ducey had called Hobbs to congratulate her Friday afternoon, before Hobbs declared victory. Shortly after Hobbs declared victory Friday night, Gaynor conceded the race.

Tonight I called @KatieHobbs to congratulate her on winning the race for AZ Secretary of State. It was an honor to be the Republican nominee. Many thanks to everyone who supported my campaign. Best of luck to Katie. — Steve Gaynor (@realSteveGaynor) November 17, 2018

"We have said all along that this race was the most competitive statewide," Hobbs said presciently, the day before Election Day, in an interview with Phoenix New Times.

At 10:19 p.m. local time on Tuesday, November 6 — election night — the AP called the race for Gaynor. With 29 percent of precincts reporting, Gaynor had won 51.2 percent of the vote, to Hobbs' 48.8 percent, leading by tens of thousands of votes. By midnight, about 810,000 ballots still remained uncounted statewide.

Hobbs did not concede after the AP's declaration. At 10:54 p.m. local time, her campaign issued a statement calling its decision "head-scratching," saying it was too early to call the race.

“The Associated Press has incorrectly called the Secretary of State race in Arizona with a razor-thin margin and hundreds of thousands of ballots remaining to be counted,” Niles Harris, Hobbs' campaign manager, said. “We are cautiously optimistic that when all the ballots are counted, Katie Hobbs will be elected Arizona’s next Secretary of State."

Two days later, with nearly 496,000 ballots left to process, Gaynor led with less than 20,000 votes. At that time, the county with the largest number of ballots left, Maricopa, still had 345,000 of them to process.

On Monday, when Hobbs took the lead with about 5,000 votes, the AP retracted its call. "No new call will be made until the results of the election are certified by Arizona officials," it said. "Arizona typically counts its votes slowly."

Steve Gaynor. Courtesy of Arizona PBS

Lauren Easton, a spokesperson for the AP, did not respond to questions seeking specific numbers or details on how the AP called the race for Gaynor, and instead referred to a generic explanation on the AP's website.

The AP says it was 99.9 percent accurate in calling races in the 2012 elections.

"On election night, race callers in each state are armed with a wealth of additional detailed information from our election research team, including demographics, the number of absentee ballots, and political issues that may affect the outcome of races they must call," the AP states on its website.

Hobbs and Gaynor campaigned on starkly different platforms, and their resumes had clear contrasts as well.

Hobbs, the Senate minority leader, is a social worker. She was first elected to the Arizona House of Representatives in 2010 and state senate in 2012. Her campaign for secretary of state was supported by the Democratic Party, and the voting-rights group iVote said it invested $3.3 million in supporting her. Hobbs ran on a platform of enhancing voter access through more voter outreach and education and for minorities, tribal communities and rehabilitated felons.

Gaynor, a wealthy businessman, had never before run for public office. He poured $2.35 million of his own money into his campaign, in which he promised to limit access to the ballot box, in part through stricter voter identification. He called for overturning the 1993 National Voter Registration Act, which aimed at streamlining voter registration.

In winning this race, Hobbs will be yet another Democrat who won a tightly contested, drawn-out statewide race in historically red Arizona.

On Monday, Republican Martha McSally conceded the race for U.S. senator to Democrat Kyrsten Sinema. The night before, Democrat Kathy Hoffman declared victory over Republican Frank Riggs in the race for Arizona Superintendent of Public Instruction.

In an interview the day before Election Day, Hobbs said that she ran for secretary of state because she was concerned about mismanagement and incompetence there. She became involved in elections during her career as a social worker, including 12 years working at a domestic violence center, formerly known as the Sojourner Center. As the chief compliance officer there, she held workshops for clients teaching them how to register safely.

"The whole process of engaging people in the election process became something I was a huge advocate for," she said. Being a social worker "is very macro," she added. "It's all about systems change."