A judge on Monday blocked an Arizona county from conducting a hand count of ballots for Tuesday's upcoming election, a measure requested by Republicans over concerns that voting machines were untrustworthy. 

Pima County Superior Court Judge Casey F. McGinley made the ruling after a Friday hearing in which opponents called witnesses and presented evidence. An appeal is likely. 

The judge said the officials in Cochise County overstepped their authority by ordering the county recorder to count all the ballots cast in Tuesday's election rather than the small sample required by state law.

The opponents – a group of retirees consisting of the Arizona Alliance for Retired Americans and a voter – sued in court to stop a full hand-count. They argued that state law only allows a small hand-count of early ballots to ensure the counting machines are accurate. 

A last-minute change would create chaos and potentially delay certification of the election results, they said. Cochise County Elections Director Lisa Marra also opposes the plan for the expanded count and testified about how it could delay results and imperil ballot security.

POLLS SHOW REPUBLICANS FLIP KEY METRIC IN 2022 MIDTERM ELECTIONS, DEMOCRATS 'BLEW THEIR LEAD'

Arizona election ballots hand count

A campaign volunteer stands at a Kari Lake merchandise table during a campaign stop in Gilbert, Ariz. On Monday, a judge blocked an Arizona county’s plan to conduct a full hand-count of ballots from Tuesday's election.  (AP)

"This ruling is a big win for all voters in Cochise County, particularly older voters who are more likely to vote early in Arizona," Saundra Cole, president of the AARA chapter in Arizona, said in a statement, AZ Central reported.

The lawsuit only challenged the hand count of around 30,000 early ballots. However, the ruling appears to have blocked a full hand count of ballots that will also be cast on Tuesday.  

"This entire process would be rendered superfluous if the court were to construe (that section) to initially select 100% of the precinct ballots as its starting point," McGinley wrote.

The two Republicans who hold the majority on the three-member Cochise County board of supervisors voted to go ahead with the full hand-count of the early ballots despite opposition from the county’s elected Republican attorney and the election director for Democratic Secretary of State Katie Hobbs. Both said a full hand-count of early ballots is illegal under state election law, which only allows 1%, or 5,000 of the early ballots, whichever is less, to be tallied to ensure the accuracy of the machines. Hobbs is running for governor.

The ruling comes as Arizona faces several House races and a Senate race that could determine which political party holds the majority in Congress. Elected officials on both sides have warned of intimidation tactics and election practices that could sway the results in the other's favor. 

Last week, a federal judge in Arizona ordered a temporary restraining order on ballot box watchers to stay at least 250 feet away from certain polling locations, following complaints that people carrying guns and wearing masks were intimidating voters. 

CLICK HERE TO GET THE FOX NEWS APP

The League of Women Voters of Arizona requested the order after Clean Elections USA called for 24-hour surveillance of ballot boxes in Maricopa County, where election controversy remains high two years after the 2020 general election.

The Associated Press contributed to this report.