MADISON, Wis. (AP) — A Wisconsin judge on Thursday sided with conservatives, ruling that absentee ballot drop boxes cannot be located anywhere other than at offices of local clerks and that no one other than the voter may return such a ballot.

The ruling, which will almost certainly be appealed all the way to the Wisconsin Supreme Court, hurts Democrats who had pushed for expanded absentee ballot use during the pandemic in 2020 when President Joe Biden defeated Donald Trump by fewer than 21,000 votes. It comes 10 months before Democratic Gov. Tony Evers and Republican U.S. Sen. Ron Johnson are up for reelection in key races targeted by both parties.

Supporters of ballot boxes will seek a stay of the ruling, said attorney Jeff Mandell, who is with the group Law Forward that represented Disability Rights Wisconsin and other groups in the case. He said the case ignores the law to achieve a political advantage.

“If it goes into effect, this ruling will prevent some people from casting their ballots,” Mandell tweeted.

The lawsuit is part of a multipronged attack on absentee ballot boxes by Republicans in Wisconsin. Republicans are also attempting to change state law to limit ballot boxes and force the bipartisan state elections commission to enact rules restricting their location.

The Republican push against absentee ballot boxes comes after Biden’s win. A Republican-ordered investigation into the election is ongoing, even after numerous lawsuits, recounts and other probes have upheld Biden’s victory and determined there was no widespread fraud.

Republicans have made similar moves since Trump’s defeat to tighten access to ballots in other battleground states. The restrictions especially target voting methods that have been rising in popularity and erecting hurdles to mail balloting and early voting that saw explosive growth earlier in the pandemic. More than 40% of all voters in the 2020 presidential election cast mail ballots, a record high.

The ruling, if it stands, means that no ballot drop boxes can be used in the upcoming Feb. 15 spring primary election featuring a bevy of local races. The spring general election is April 5.

One of the defense attorneys told the judge following his oral ruling that the changes he ordered were contrary to a 2006 U.S. Supreme Court decision that said the rules of elections should not be changed close to when ballots are cast because it creates confusion.

Waukesha County Judge Michael Bohren responded that he was confident the changes could be executed in time. Elections commission spokesman Riley Vetterkind said staff and commissioners plan to review the court’s order and consult with attorneys in coming days.

Bohren ruled that absentee ballots could only be returned by mail or dropped off at the local election clerk’s office by the person who cast the vote, disallowing the practice known as “ballot harvesting.” Events such as “Democracy in the Park,” in which election officials accepted absentee ballots at more than 200 city parks in 2020, would be prohibited.

The lawsuit brought on behalf of two Milwaukee voters by the conservative law firm Wisconsin Institute for Law & Liberty is opposed by the Democratic Senate Campaign Committee, the Wisconsin Elections Commission, Disability Rights Wisconsin, Wisconsin Faith Voice For Justice and the League of Women Voters of Wisconsin.

Wisconsin state law is silent on drop boxes, leading to a push from Republicans who control the Legislature to pass legislation specifying where they can be placed. The elections commission has advised that local clerks can put drop boxes wherever they want, while some Republicans have said that is illegal.

Bohren ruled that the commission had no legal authority to issue that guidance and ordered the memos it issued must be withdrawn within 14 days and not followed by local election officials.

Luke Berg, an attorney for those challenging the current practice, said under current elections commission guidance “a shoebox in the park would be legal for accepting ballots.”

That’s a ridiculous argument, countered Steven Kilpatrick, a justice department attorney representing the elections commission.

Evers last year vetoed Republican bills that would have limited the location of absentee ballot drop boxes and who could return the ballots.

There are two other lawsuits on the same issue. Former Lt. Gov. Rebecca Kleefisch, a Republican candidate for governor, made similar arguments in a case she asked the conservative-controlled Wisconsin Supreme Court to take directly. It has not said whether it will hear the case and earlier ruled it would not take a ballot box challenge before it had worked its way through lower courts.

A third lawsuit was brought earlier this month by a voter seeks to overturn the state elections commission’s rejection of a complaint he filed about ballot boxes.

On Monday, Republicans on a legislative committee voted to force the elections commission to adopt formal rules on ballot boxes.