People protest the legislature's extraordinary session during the official Christmas tree lighting ceremony at the Capitol in Madison, Wis. on Dec. 4, 2018. Demonstrators booed outgoing Gov. Scott Walker on Tuesday during the festivities, at times drowning out a high school choir with their own songs in protest of a Republican effort to gut the powers of his Democratic successor.

People protest the legislature's extraordinary session during the official Christmas tree lighting ceremony at the Capitol in Madison, Wis. on Dec. 4, 2018. Demonstrators booed outgoing Gov. Scott Walker on Tuesday during the festivities, at times drowning out a high school choir with their own songs in protest of a Republican effort to gut the powers of his Democratic successor.

(Mark Hoffman/Milwaukee Journal-Sentinel)

Scott Bauer and Todd RichmondAssociated Press

Wisconsin Republicans pushed through protests, internal disagreement and Democratic opposition Wednesday to pass far-reaching legislation that would shift power to the GOP-controlled Legislature and weaken the Democrat who defeated Republican Gov. Scott Walker last month.

The vote, after an all-night debate, was the height of a rare lame-duck legislative session aimed at reducing the authority of the office Republicans will lose in January. The incoming governor and attorney general warned that resulting lawsuits would bring more gridlock after the new administration takes over.

Walker has signaled his support for the bill. He has 10 days to sign the package from the time it's delivered to his office.

Republicans were battered in the midterm election, losing all statewide races amid strong Democratic turnout. But they retained legislative majorities thanks to what Democrats say are gerrymandered districts that tilt the map.

The new legislation tries to protect some of the GOP's achievements in recent years, including a work requirement for some people receiving state health care and the state's role in a lawsuit seeking to overturn the Affordable Care Act. The bill could also make it harder for Gov.-elect Tony Evers to renegotiate a $3 billion subsidy for a Foxconn electronics manufacturing facility, a deal spearheaded by Walker.

Andy Manis/Getty Images

Wisconsin state Assembly Speaker Robin Vos, left, and Speaker Pro Tempore Tyler August listen as Democrats address the Assembly during a contentious legislative session on Dec. 4, 2018 in Madison.

Wisconsin state Assembly Speaker Robin Vos, left, and Speaker Pro Tempore Tyler August listen as Democrats address the Assembly during a contentious legislative session on Dec. 4, 2018 in Madison.

(Andy Manis/Getty Images)

"Wisconsin has never seen anything like this," Evers said in a statement. "Power-hungry politicians rushed through sweeping changes to our laws to expand their own power and override the will of the people of Wisconsin who asked for change on November 6th."

In neighboring Michigan, Republicans are discussing taking action of their own before a Democratic governor takes over there. North Carolina lawmakers took similar steps two years ago.

The Wisconsin legislation passed in a session marked by stops and starts as GOP leaders tried to muster enough votes in the Senate. That chamber ultimately approved the package 17-16, with just one Republican voting against it, around sunrise. The Assembly approved it on a 56-27 vote about two hours later, with a single Republican defecting.

In one concession, Republicans backed away from giving the Legislature the power to sidestep the attorney general and appoint their own attorney when state laws are challenged in court.

"This is a heck of a way to run a railroad," Democratic Senate Minority Leader Jennifer Shilling said as Senate debate resumed at 5 a.m. after a seven-hour impasse. "This is embarrassing we're even here."

Walker, who was booed and heckled by protesters Tuesday during an Christmas tree lighting ceremony in the Capitol rotunda, is in his final five weeks as governor. A spokeswoman did not immediately respond to a question about how quickly he would act. Walker was in Washington on Wednesday for former President George H.W. Bush's funeral.

Faced with a Democratic governor for the first time in eight years, Republicans came up with a package of lame-duck bills to preserve their priorities and make it harder for Evers to enact his.

"You're here because you don't want to give up power," Democratic Assembly Minority Leader Gordon Hintz said as debate concluded in that chamber. "You're sore losers. Does anybody think this is the right way to do business? If you vote for this, shame on you. You will go down in history as a disgrace."

Assembly Speaker Robin Vos countered that the bills would ensure a balance of power between the Legislature and the executive branch.

"We have allowed far too much authority to flow to the executive," Vos said. "To you, this is all about politics. To me, it's about the institution."

Vos last month cited the desire to protect key Republican achievements from being undone by Evers. Among them: a massive $3 billion subsidy to bring Foxconn, a key Apple Inc. supplier, to Wisconsin, along with thousands of jobs. Evers has said he would like to renegotiate the deal.

The legislation passed Wednesday would shield the state jobs agency from his control and allow the board to choose its leader until September, likely at least delaying Evers' ability to maneuver on the Foxconn subsidy.

The changes would also weaken the governor's ability to put in place rules that enact laws. And they would limit early voting to no more than two weeks before an election, a restriction similar to what a federal judge ruled was unconstitutional.

The attorney general's office could also be weakened by a proposal to require a legislative committee, rather than the attorney general, to sign off on withdrawing from federal lawsuits. That would stop Evers and Democratic Attorney General-elect Josh Kaul from fulfilling promises to withdraw Wisconsin from a multi-state lawsuit seeking repeal of the Affordable Care Act. They made opposition to that lawsuit a central part of both of their campaigns.

Judges could block the proposals if they become law by issuing temporary injunctions, which could last the duration of the cases. Democrats would likely need a permanent injunction to stop the changes for good, but Republicans would almost certainly pursue appeals all the way to the state Supreme Court, which is controlled by conservative justices.

The Legislature passed another measure to enact Medicaid work requirement rules that Walker recently won a federal waiver to establish. That bill would also give the Legislature oversight over the governor seeking future waivers for health care, a change Democrats said would handcuff the new administration.

Rep. Todd Novak of Dodgeville, the only Republican in the Assembly to vote against the bills, said he did so after hearing from "an overwhelming number of voters" in his district who opposed the legislation.

"It is my job," Novak said, "to cast my vote in the interest of those whom I represent."