MADISON, Wis. - The Republican-controlled Wisconsin Legislature has approved a sweeping package of bills weakening the incoming Democratic governor and attorney general.

The state Assembly approved the lame-duck legislation Wednesday morning. The Wisconsin Senate did the same less than three hours earlier after lawmakers worked through most of the night.

The bills now go to outgoing Republican Gov. Scott Walker, who has signaled his support.

The measures would limit the governor's ability to promulgate administrative rules, which enact laws and give lawmakers the power to control appointees to the state economic development agency's board.

The package would also require the attorney general to get legislative approval to withdraw from lawsuits. That move is designed to block Democratic Gov.-elect Tony Evers from allowing incoming attorney general, Democrat Josh Kaul, to withdraw Wisconsin from a multistate lawsuit challenging the Affordable Care Act.

The measures also restrict early in-person voting to two weeks before an election.

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

Republicans – who spent most of their overnight lame-duck session behind closed doors negotiating among themselves – also hoped to pass a bill to protect coverage of pre-existing conditions after Democrats won every statewide office last month after campaigning on the issue.

GOP lawmakers at 4 a.m. CT unveiled changes to the legislation that kept intact the heart of their lame-duck plan to give them a greater say in running state government as Evers prepares to take office Jan. 7.

The updated bill would until September give the Legislature control of the Wisconsin Economic Development Corp. board and allow the board to choose the leader of the agency, instead of the governor as is the case in current law. Republicans would initially have a majority of the board but after September control would be split evenly between Republicans and Democrats.

The original bill would have permanently eliminated Evers' ability to pick the CEO of the jobs agency.

Lawmakers also removed a measure that allowed the Legislature to replace incoming Democratic Attorney General Josh Kaul with private attorneys picked by lawmakers at taxpayer expense. But other provisions remained that would allow lawmakers to more easily hire private attorneys when they are sued for violating the open records law or other statutes.

The updated version of the legislation would allow the Legislature to intervene in litigation when state laws are challenged in court. The attorney general would have to get the approval of lawmakers before signing off on any settlements.

Republicans backed off on some of their changes limiting Evers' control of state rules, but kept in place a provision that would expand lawmakers' power to block those rules.

At 5:22 a.m., the Senate went the latest it had gone since 1995, when it went until 8:36 a.m. as it deliberated over the legislation to build Miller Park, according to Senate records.

Sleep-deprived Democrats panned both the legislation and the process Republicans used to pass it. For most of the early-morning hours, rank-and-file members from both parties were in the dark about what would be taken up.

"We've had 132 legislators milling around this building for a day. And night. And morning," Senate Minority Leader Jennifer Shilling of La Crosse said while unsuccessfully lobbying to recess until lawmakers could get some sleep before voting on complex legislation.

"Not a way to run a government!" Democratic Sen. Dave Hansen of Green Bay said at 4 a.m. when a new, 56-page version of the legislation was released.

Assembly Speaker Robin Vos of Rochester told reporters he wanted to make sure lawmakers have as much control of state government as Evers.

“We did have an election. Whether everyone here likes it or not, I respect the fact that Tony Evers is the governor and he’s going to be starting on January 7,” Vos said at a news conference. “But he’s not the governor today and that’s why we’re going to make sure the powers of each branch are as equal as they can be.”

Contributing: The Associated Press.