MADISON, Wis. – After an all-nigh session, Republicans in the Wisconsin state Legislature on Wednesday sent outgoing Republican Gov. Scott Walker legislation to limit early voting and diminish the powers of the Democrat who beat him last month.

Walker in recent days has signaled he will sign it before he leaves office Jan. 7.

In another early morning vote, state senators failed to deliver on a campaign promise from Walker to approve legislation that would protect health insurance coverage for those with pre-existing conditions.

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.

All Democrats and two Republicans in the state Senate voted against that legislation, killing a bill that passed the Assembly that year. Legislative leaders said they would try again to pass such protections early next year.

The failed legislation comes as Republicans approved their measure curtailing the powers of Evers and incoming Democratic Attorney General Josh Kaul. The legislation would hamper them from withdrawing the state from a federal lawsuit seeking to overturn the Affordable Care Act and the protections it provides for coverage of pre-existing conditions.

Dec. 5:Wisconsin GOP makes lame-duck moves to strip incoming Dems' power: What you need to know

Dec. 4:Amid protests, Wisconsin Republicans plan to vote on curbing powers of new Democratic governor

The issue was central in both their races as Democrats hammered Republicans over the state's participation in the lawsuit that Walker authorized.

Evers slammed Republicans as "power-hungry."

"Wisconsin has never seen anything like this," Evers said Wednesday. "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."

Republicans spent much of the night working behind closed doors and unveiled a modified version of their legislation around 4 a.m. CT.

Senators passed the legislation 17-16, with Republican Sen. Rob Cowles of Green Bay joining Democrats in opposing the legislation. The Assembly passed the measure 56-27 along party lines.

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

Evers has said he wants to dismantle the agency and Republicans said they hoped he would come to see its value over the next nine months, when Republicans have control of the board.

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

Lawmakers also removed a measure that would have allowed the Legislature to replace Kaul, the incoming attorney general, with private attorneys picked by lawmakers at taxpayer expense. Other provisions remained that would allow lawmakers to intervene in lawsuits when state statutes are challenged and hire private attorneys when they are sued.

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.

Opinion:Wisconsin and Michigan power grabs: Lame-duck lawmakers are threatening democracy itself

Dec. 3:GOP seeks to limit Wisconsin early voting, strip powers from new Democratic governor, AG

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.”

Democrats scoffed at that notion.

"Co-equal branches is not subjective depending who is in office," said Assembly Democratic Leader Gordon Hintz of Oshkosh. "It’s about the fundamental structure of how government is supposed to work and you guys are fundamentally changing that."

Contributing: Mary Spicuzza, Milwaukee Journal Sentinel; The Associated Press. Follow Patrick Marley and Molly Beck on Twitter: @patrickdmarley and @MollyBeck