PHOENIX (AP) — Margins between Democrats and Republicans in key Arizona races narrowed considerably Wednesday as election officials chipped away at counting more than half a million mail ballots returned on Election Day and shortly before.

Democrats maintained small but dwindling leads in key races for U.S. Senate, governor and secretary of state, while Republicans were optimistic the late-counted ballots would break heavily in their favor, as they did in 2020.

It could take several days before it’s clear who won some of the closer contests.

With Republicans still in the hunt, it remained unclear whether the stronger-than-expected showing for Democrats nationally would extend to Arizona, a longtime Republican stronghold that became a battleground during Donald Trump’s presidency.

The GOP nominated a slate of candidates who earned Trump’s endorsement after falsely claiming his loss to President Joe Biden was tainted.

Among them former television news anchor Kari Lake was about half a point behind Democratic Secretary of State Katie Hobbs in the race for governor, a contest that centered heavily on Lake’s baseless claims of fraud in the 2020 election. The Republican candidate for attorney general also trailed narrowly.

Democrats had more comfortable 5-point margins in the races for U.S. Senate and secretary of state, but with so many ballots outstanding, the races were too early to call.

In the race for attorney general, Republican Abraham Hamadeh took the lead from Democrat Kris Mayes.

Officials in Maricopa County, the state’s most populous, said about 17,000 ballots were affected by a printing mishap that prevented vote-counters from reading some ballots, a problem that slowed voting in some locations and infuriated Republicans who were counting on strong Election Day turnout. County officials said all ballots will be counted but gave no timeline for doing so.

The cause of the printing issue remains a mystery. The two top officials on the county board of supervisors, both Republicans, said in a statement Wednesday night that they used the same printers, settings and paper thickness during the August primary and pre-election testing, when there were no widespread issues.

“There is no perfect election. Yesterday was not a perfect election,” Bill Gates, chairman of the board of supervisors, told reporters earlier in the day. “We will learn from it and do better.”

Lake repeated her pledge to immediately call lawmakers into special session upon being sworn in to make massive changes to Arizona election laws. She wants to significantly reduce early and mail voting, options chosen by at least 8 in 10 Arizona voters, and to count all ballots by hand, which election administrators say would be extremely time consuming.

Ballots can have dozens of races on them. Maricopa County has more than 50 judges on the ballot, on top of state and local races and 10 ballot measures.

“We’re going to go back to small precincts where it’s easier to detect problems and easier to fix them and it’ll be easier to hand count votes as well,” Lake told Fox News host Tucker Carlson on Wednesday night. “These are some of the things I’d like to see happen. I’ll work with the Legislature.”

A political urban-rural divide was evident among Arizona voters.

Democrats Hobbs and Sen. Mark Kelly each drew support from nearly two-thirds of urban voters, according to AP VoteCast, an expansive survey of more than 3,200 voters in Arizona.

Suburban voters split about evenly between the two Democratic candidates and their GOP rivals, Lake and Blake Masters. Small town and rural voters were more likely to favor Lake and Masters.

In the Senate race, suburban men and women were divided in their candidate preferences. Suburban men clearly favored Masters, suburban women Kelly.

In the race for governor, suburban men overwhelmingly backed Lake, while suburban women slightly favored Hobbs.

Meanwhile, Republicans who control the three-member board of supervisors in southeastern Arizona’s GOP-heavy Cochise County voted Wednesday to appeal a judge’s decision that blocked them from hand-counting all the ballots, which are also being tabulated by machines.

The efforts to hand-count ballots in the county and elsewhere across the nation are driven by unfounded concerns among some Republicans that problems with vote-counting machines or voter fraud led to Trump’s 2020 defeat.

A judge said the plan ran afoul of state election law that limits hand-counts to a small sample of ballots, a process meant to confirm the machine count was accurate.

___

Associated Press writers Bob Christie and Terry Tang contributed to this report.