Republican legislative leaders in Wisconsin called lawmakers back to the Capitol Friday afternoon to change state law governing special elections.

The move comes a day after a court ruled that Gov. Scott Walker, a Republican, must hold a pair of special elections, which Walker has sought to avoid.

Democrats called the plan to change the law an “attack on democracy.”

“It’s clear that little thought was given to the impact of the special elections ruling,” Speaker Robin Vos and Senate Majority Leader Scott Fitzgerald said in a statement, saying an extraordinary session of the legislature was necessary to “clean up” the statute on special elections.

“In essence, there will be two elections occurring simultaneously for the two offices,” the statement continued. “It will undoubtedly lead to voter confusion and electoral chaos. Also, holding the special elections after the conclusion of the regular session is a waste of taxpayer dollars and local government resources.”

Gov. Walker applauded the decision, saying he supported and intended to sign the legislature’s plan to “clarify special election law.”

Vos and Fitzgerald said they made their decision in consultation with Republican Attorney General Brad Schimel, who represented Walker in the lawsuit brought by a national Democratic group lead by former U.S. Attorney General Eric Holder.

Attorneys for Holder’s group argued that refusing to hold the elections was “textbook voter disenfranchisement.” Wisconsin said there was no need to hold elections since the Legislature’s regular session ended this week.

A Wisconsin judge ruled Thursday that refusing to hold the elections would disenfranchise thousands of voters who live in districts that have been unrepresented since two Republican lawmakers vacated their seats in December 2017.

Judge Josann Reynolds, who was appointed by Walker in 2014, ordered Walker to issue the order calling the special elections no later than March 29.

Schimel’s office told TPM on Friday morning that it had not yet decided whether it would appeal the ruling.

Both Holder’s group and the Wisconsin Democratic Party sent out statements blasting Republican lawmakers’ move to undermine Reynolds’ decision.

Holder said that Wisconsin Republicans appeared “to be afraid of the voters” and that his group was willing to take further legal action. Wisconsin Democratic Party Chair Martha Laning struck a similar note, saying Republicans “publicly embarrassed themselves by calling a legislative session that is a clear attack on democracy just so they can avoid losing more special elections.”

In January, Democrat Patty Schachtner scored a big upset by winning a state Senate seat in a rural, conservative Wisconsin district. Walker called the victory a “wake up call,” and national Democrats pointed to it as the latest sign that they could see a huge wave in the November midterms.