Maricopa County Superior Court Judge Timothy Ryan denied a request from Republicans to keep the polls open, saying that he didn’t see evidence that people were not allowed to vote.
Lawyers for the GOP candidates had also asked that election results be delayed until 11 p.m.
Polls in Arizona closed at 7 p.m.
The lawsuit comes after issues with tabulation machines at about 20% of Maricopa County polling sites. Election officials say the problems have been resolved at the affected voting centers.
The county recorder, Republican Stephen Richer, said he was sorry for the inconvenience.
"Every legal vote will be tabulated. I promise," he said.
The Associated Press (AP) contributed to this report.