PHOENIX (AP) — As the Arizona Senate vote count starts to tip into Democratic terrain, a judge Friday will hear a lawsuit by the GOP seeking to limit the tally ― or expand it in the state’s conservative-leaning rural areas.

Four local Republican parties filed a lawsuit Wednesday night challenging the state’s two biggest counties for allowing voters to help resolve problems with their mail-in ballot signatures after Election Day. If the signature on the voter registration doesn’t match that on the sealed envelope, both Maricopa and Pima County allow voters to help them fix, or “cure” it, up to five days after Election Day.

Many other counties only allow voters to cure until polls close on Election Day.

Only a few thousand votes would be affected by the suit, but every one counts in the razor-close U.S. Senate race between Democratic Rep. Kyrsten Sinema and Republican Rep. Martha McSally. On Thursday, Sinema jumped into a minuscule lead of about 9,000 out of 1.9 million votes counted after trailing since Tuesday. Her lead came from the two counties singled out by Republicans in their lawsuit, Maricopa and Pima Counties.

The race remained too close to call with at least 400,000 ballots still uncounted. Maricopa County Recorder Adrian Fontes said counting may continue until Nov. 15. “We know there’s urgency out there, but we want to get it right, not quick,” he said.

Arizona is notoriously slow at tallying ballots even though about 75 percent of votes are cast by mail. Each of those ballots must go through a laborious verification process.

If the signature on the envelope does not match the signature on the voter file, elections officials can contact the voter to try to resolve the discrepancy. Such situations arise, for example, when voters have Parkinson’s disease and can no longer sign as they did in the past or as their signature changes over the years.

The GOP lawsuit centers on that “cure” process. It asks that the judge either stop Maricopa and Pima from contacting voters to fix their ballots after Election Day or permit the rest of the state to do it. At least two other rural counties also allow post-Election Day “cures” but several others do not.

Democrats contended that the GOP is trying to prevent votes from being counted. “The Republican Party is doing everything it can to silence thousands of Arizonans who already cast their ballots,” Democratic Party chairwoman Felicia Rotellini said in a statement.

GOP attorney Brett Johnson said in an interview the party would be happy if the end result is the rural counties are ordered to extend their cure period and more votes are counted. “At the end of the day, each vote should be treated the same way,” Johnson said.

The state’s junior Republican Senator, Jon Kyl, issued a statement trying to frame the lawsuit as a question of equal protection rather than limiting urban vote counting. “Every single lawful vote in Arizona should be counted,” Kyl said. “And voting laws in our state should be applied uniformly across the map.”

At a brief hearing Thursday, a Maricopa County official said only about 5,600 ballots are at issue in her county and the rate is similar in the 14 smaller counties. More than 2.2 million votes were cast statewide.

There were more than 600,000 mail-in ballots left to process statewide as of Wednesday, about 75 percent in Maricopa County. That huge amount has put pressure on a system that spends a lot of time already verifying the mail ballot signatures.

Fontes said his office’s 1980s-era computer system is partly to blame. It was put in when Maricopa was far smaller and only a handful of its residents voted by mail.

He said the system only allows his office to tally about 75,000 votes a day. There are another 375,000 votes outstanding in Maricopa County alone as of Thursday night.

The two Senate campaigns have long braced for a slow vote count. McSally is no stranger to the issue. It took The Associated Press 12 days to declare a winner in McSally’s first race for Congress, which she narrowly lost in 2012.

On Thursday, she tweeted: “Woke up this morning dreading a long and painful process. I’ve been here before, and now, here I am again.the dentist’s chair.” She attached a photo of herself leaning back at the dentist’s office, about to get her teeth examined.

Sinema also had to wait for finality in her first congressional election that year, sweating out six long days of vote counts. She prevailed.