(Reuters) - A Wisconsin judge on Thursday blocked legislation passed by Republican lawmakers during a December lame-duck session intended to curb the powers of newly elected Democratic Governor Tony Evers, calling the measures unconstitutionally approved.

The governor immediately moved to withdraw Wisconsin from a multistate lawsuit that seeks to overturn the Obamacare healthcare law, the signature domestic achievement of former Democratic President Barack Obama and a longtime target of Republicans, including President Donald Trump.

One of the statutes passed in December prevented Evers from pulling out of the lawsuit absent legislative approval, until Thursday’s decision set the law aside.

Democrats had criticized the legislation as a last-minute power grab. Republican lawmakers in North Carolina and Michigan pursued similar lame-duck moves after Democratic victories in November.

“The legislature overplayed its hand by using an unlawful process to accumulate more power for itself and override the will of the people,” Evers said in a statement.

Wisconsin Republican legislative leaders vowed to appeal the ruling from Dane County Circuit Judge Richard Niess, who issued a temporary injunction stopping the laws from taking effect.

“For decades the legislature has used extraordinary sessions that have been widely supported by members of both parties,” Robin Vos, the state Assembly speaker, and Scott Fitzgerald, the state Senate majority leader, said in a joint statement.

“Today’s ruling only creates chaos and will surely raise questions about items passed during previous extraordinary sessions, including stronger laws against child sexual predators and drunk drivers,” the statement added.

In his decision, Niess said the legislature’s use of an “extraordinary session” was not explicitly permitted under the state constitution.

“The bottom line in this case is that the legislature did not lawfully meet during its December 2018 ‘extraordinary session,’” he wrote.

Lawyers for the legislature had argued that an injunction would cause disruption by making thousands of statutes vulnerable to legal challenges, but Niess rejected that claim.

“Is there anything more destructive to Wisconsin’s constitutional democracy than for courts to abdicate their constitutional responsibilities by knowingly enforcing unconstitutional, and therefore, non-existent laws?” he concluded.

The ruling came as part of a lawsuit filed by several left-leaning groups.

Several other lawsuits have been filed challenging the lame-duck legislation. In January, a federal judge in Wisconsin blocked a Republican-backed law that would limit early voting across the state to two weeks.