A Wisconsin judge is prohibiting voters from canceling their original absentee ballot and casting a new one, siding with a conservative group created by prominent Republicans that said the practice known as ballot spoiling is illegal.

The ruling Wednesday from a Waukesha County judge who was a former Republican attorney general comes as voters in the battleground state are submitting their absentee ballots for the Nov. 8 election. Democratic Gov. Tony Evers and Republican Sen. Ron Johnson are both on the ballot.

Restoring Integrity and Trust in Elections filed the lawsuit on behalf of Brookfield voter Nancy Kormanik last month. It challenged the guidance issued on Aug. 1 to more than 1,800 local election clerks by the state elections commission detailing how they can spoil an absentee ballot at the request of the voter after it’s already been returned.

Ballot spoiling got more attention in the August primary after a Republican candidate for governor and three top Democratic candidates for U.S. Senate dropped out of the races, but their names were still on the ballots. The elections commission made clear then that voters who had cast their ballots for one of them absentee could spoil it and vote again for someone still in the race.

WISCONSIN PARENTS LOSE SON TO FENTANYL, BEG OTHER FAMILIES TO KNOW THE TRUTH ABOUT THE DEADLY DRUG

The commission did not immediately have numbers Thursday of how many ballots had been spoiled in the primary.

This is not a common policy across the country, and only a few states do something similar due to logistical challenges associated with pre-processing of ballots, according to Sylvia Albert, director of voting and elections for the nonpartisan voter advocacy group Common Cause.

Madison, Milwaukee, Green Bay news

A Wisconsin judge has prohibited voters from canceling their original absentee ballots in order ton cast new ones.

In most states, local election officials can begin verifying mail ballots and processing them ahead of time, which involves removing them from their envelopes so there is no way to track who voted which ballot.

RITE argued that the practice in Wisconsin is both against the law and creates additional opportunities for fraud and confusion. The group was created in July by former U.S. Attorney General William Barr, longtime Republican strategist Karl Rove, GOP donor Steve Wynn and others. The group has also filed election-related lawsuits in the battleground states of Arizona and Pennsylvania.

The Democratic National Committee joined the bipartisan Wisconsin Elections Commission in fighting the lawsuit.

WISCONSIN AG CANDIDATES ERIC TONEY, JOSH KAUL TO DEBATE AT STATE BAR HEADQUARTERS

Waukesha County Circuit Judge Brad Schimel, who was attorney general from 2015 to 2019, sided on Wednesday with RITE and ordered the election commission to rescind its guidance. He also denied a request to put his oral ruling on hold. A written order was expected Thursday.

It's the latest legal defeat for the commission, which Republican lawmakers who created it have targeted for abolishment. Republican gubernatorial candidate Tim Michels also supports doing away with the commission. The commission and its guidance became a target after Donald Trump narrowly lost Wisconsin in 2020, an outcome that's withstood numerous lawsuits, two partial recounts, a nonpartisan audit and partisan reviews.

A judge last month ruled that commission guidance allowing election clerks to fill in missing information on a witness certification for absentee ballots was illegal and must be rescinded. Two other lawsuits are pending seeking orders on what constitutes enough of an address for an absentee ballot to be accepted.

Spokespeople for elections commission, the state Department of Justice and the Democratic National Committee did not immediately return messages seeking comment Thursday on the latest ruling.

Jaime Harrison, the Democratic National Committee chair, said before the ruling that the lawsuit was an attempt by Republicans and their allies to "restrict voting access and undermine the democratic process – and we’re fighting back."

WISCONSIN'S RISING CRIME CAUSED BY TONY EVERS 'WEAK LEADERSHIP': GOP CANDIDATE TIM MICHELS

Derek Lyons, president of RITE, called the ruling "another major victory for Wisconsin voters."

"WEC’s unlawful guidance destroys voter confidence and taints the integrity of Wisconsin’s elections," he said in a statement. "Once a vote is cast, it is cast. Period."