Wisconsin Gov. Scott Walker, a former presidential candidate, listens during the Republican National Convention in Cleveland on July 18. (Victor J. Blue/Bloomberg News)

A federal judge ruled Tuesday that voters in Wisconsin who lack the specific kind of identification the state requires be allowed to vote in November by signing an affidavit as to their identity.

In the latest installment of a long-running legal battle over a law passed five years ago by the state’s Republican legislature and signed by Gov. Scott Walker (R), U.S. District Judge Lynn S. Adelman said the law would exclude qualified voters.

“Although most voters in Wisconsin either possess qualifying ID or can easily obtain one, a safety net is needed for those voters who cannot obtain qualifying ID with reasonable effort,” Adelman wrote in his 44-page decision.

The ruling would allow voters to use affidavits instead of IDs to vote in the Nov. 8 presidential election. Adelman said there would not be enough time to implement the new system for the Aug. 9 primary for congressional and state legislative races.

As the presidential election approaches, numerous legal battles are being waged nationwide over voter-ID laws. Republicans say they are necessary to protect the integrity of the system and discourage voter fraud, and Democrats say they are aimed at poor and minority voters who most often lack the specific kinds of identification the laws require.

The biggest battle is over a Texas law that is considered one of the most strict in the nation and is under review by the U.S. Court of Appeals for the 5th Circuit. The Supreme Court has told that court that it should issue an opinion in the case soon, so that the loser can make what is sure to be an inevitable challenge to the justices.

The Wisconsin decision is likely to be appealed as well, and there are also challenges to laws in North Carolina and Virginia.

Adelman, at one point, had found the Wisconsin law unconstitutional but was overruled by the U.S. Court of Appeals for the 7th Circuit. The state made some changes in the law, and it was back for further review.

Even with the changes, Adelman said, thousands of eligible voters lack the necessary ID, and “it is virtually self-evident that some of them will either need to exercise an extraordinary effort to obtain qualifying ID or be unable to obtain ID no matter how hard they try.”

Adelman said that there is “virtually no voter-impersonation fraud in Wisconsin” and that the state has “produced no evidence suggesting that the public’s confidence in the electoral process would be undermined” by allowing those who cannot obtain the ID to vote by presenting an affidavit.

Wisconsin Attorney General Brad Schimel (R) said in a statement that his office is studying the ruling before deciding the next step.

Sean Young, a lawyer with the American Civil Liberties Union, praised the decision.

“Wisconsin’s voter ID law has been a mistake from day one,” he said in a statement. “This ruling is a strong rebuke of the state’s efforts to limit access to the ballot box. It means that a fail-safe will be in place in November for voters who have had difficulty obtaining ID.”