Wisconsin’s judiciary, officially nonpartisan, has been marred in recent years by political intrigue, divisive elections and even accusations of one judge placing another in a chokehold.

Now it may be what decides the fate of the outgoing governor’s new laws to limit the power of his successor.

“There will be a challenge, no doubt,” Gov. Scott Walker said a few days before he signed bills expanding the power of legislative Republicans he teamed up with over the past decade. “They’ve challenged just about everything we or lawmakers have done.”

The threat of litigation has rarely dissuaded Walker, a Republican who reshaped Wisconsin in his conservative image and who signed the power-shifting measures Friday afternoon as one of his final acts in office. The judiciary has upheld several of Walker’s signature policies in recent years, despite fierce challenges from the left. And as Walker predicted, liberal groups quickly vowed legal action on the new legislation.

“This is a shameful attack on our democracy by politicians who will do anything to hold onto power,” said Eric Holder, an attorney general under President Barack Obama who leads one of the groups that has promised a court fight. In a statement, Holder called the new laws “grossly partisan” and “deeply undemocratic.”

After Democrats won top posts in a state that had been controlled over the past eight years by Republicans, Wisconsin is at the center of a bitter national debate over political norms, the transfer of power between parties and the roles of the executive and legislative branches. A similar power struggle in North Carolina, after a Democratic governor won election in 2016, set off a court battle, and the fate of Wisconsin’s new laws seems destined for that as well.

The courts have played a central role in a larger ideological split that has unfolded across the state — which both Obama and President Donald Trump carried and where its two U.S. senators, Republican Ron Johnson and Democrat Tammy Baldwin, could not be more different.

With conservatives holding a one-vote majority, the state Supreme Court has also been at the forefront of a pattern Democrats say they have grown tired of: Republicans pass right-leaning policies despite protests, Walker signs them, and the judiciary upholds them, even if a local judge first expresses skepticism.

The court’s ideological divide is clear, but many conservatives in the state reject the rubber-stamp argument.

Still, Walker has repeatedly received friendly rulings from the state’s highest court. And he has expressed confidence that the new measures will ultimately pass legal muster, even if a local judge in a liberal city like Madison strikes some of them down for a time.

The three laws Walker signed Friday include provisions ranging from the niche (Gov.-elect Tony Evers would need legislative approval to ban guns at the Capitol) to the expansive (Republican lawmakers could intervene in lawsuits and block more administrative rules). The laws also curbed the authority of the new Democratic attorney general, further codified voter identification and Medicaid work requirements and cut early voting to two weeks.