Wisconsin Republicans are about to lose a governor who supports their policies to limit assistance to the poor, so they just locked them in before a newly elected Democrat takes office.

In the early morning hours of a lame-duck session Wednesday, state lawmakers approved legislation that would prevent Governor-elect Tony Evers and Attorney General-elect Josh Kaul from carrying out their campaign promises to protect and expand food, medical and unemployment assistance for low-income Wisconsinites.

Specifically, the bills curtail the governor’s ability to make administrative changes to joint state-federal programs like unemployment insurance, food stamps and Medicaid and the attorney general and governor’s authority to end lawsuits brought by the state, a move designed to keep Wisconsin in a legal action seeking to repeal the Affordable Care Act.

“We have allowed far too much authority to move to the executive branch,” Wisconsin State Assembly speaker Robin Vos (R) said on Twitter.

The lame-duck shenanigans in Wisconsin followed an effort by Michigan Republicans to undercut ballot initiatives that would have raised the minimum wage and granted workers paid sick leave.

The Wisconsin bill would require Evers to run a drug testing program for a subset of people enrolled in FoodShare, as the federal Supplemental Nutrition Assistance Program is known in the state. Drug testing had been a priority of Gov. Scott Walker’s as part of his general commitment to making antipoverty programs more of a hassle. The screening would start with a paper questionnaire and escalate to urinalysis depending on an applicant’s answers.

“The point of the reform is to provide a chilling effect that causes applicants to lose interest in going through all of the program requirements,” Sherrie Tussler, director of the Milwaukee Hunger Task Force, said in an interview. “The result is it’s going to increase hunger.”

And the bill adds a new layer of government bureaucracy. Instead of seeking adjustments to program rules directly from the U.S. Department of Agriculture, the Wisconsin Department of Health Services would have to go to Republicans in the state legislature first. In recent years, Tussler said, the state has obtained federal waivers for leeway to do such picayune things as allowing food stamp recipients to certify their poverty with a phone interview instead of having to drive to an office.

Perhaps most significantly, the bill blocks Evers from canceling the state’s new work requirements for Medicaid enrollees, which President Donald Trump’s administration approved in October. Under this policy, adults aged 19 to 49 who do not have disabilities will have to demonstrate they are working at least 80 hours a month or they will lose their health benefits.

The state also will impose monthly premiums on some enrollees in Medicaid ― called BadgerCare in Wisconsin ― with annual incomes as low as $6,070, which is half the federal poverty level. The legislation also imposes drug-testing requirements on Medicaid beneficiaries, a policy the Trump administration already rejected when Gov. Scott Walker (R) requested it.

In Wisconsin, only those adults with incomes at or below poverty, which is $12,140 for a single person and $25,100 for a family of four, qualify for Medicaid, although pregnant women with higher incomes are eligible. Under Walker, the state did not participate in the Affordable Care Act’s expansion of Medicaid to people who earn up to 133 percent of the poverty level. Evers supports the expansion and plans to attempt to enact it.

Wisconsin is one of five states with federal approval for work requirements, along with Arkansas, Indiana, Kentucky and New Hampshire. Arkansas is the only state to begin implementing the policy so far, and more than 12,000 people lost their Medicaid coverage in the first three months of the policy.

The bill goes even further by limiting the governor’s authority to request any modifications to the Medicaid program from the federal government without approval by the state legislature.

Hannah Katch, a Medicaid expert at the Center on Budget and Policy Priorities, said it’s unusual for a governor to have to get the legislature’s approval for even small changes to a state-federal program. “I don’t know of any state that has that kind of requirement,” she said.

Under another bill the state legislature passed Wednesday, Kaul and Evers are forbidden from withdrawing the state’s participation in any pending lawsuits filed by the state without legislative approval. The legislature in effect is taking for itself the governor’s authority to approve the attorney general’s plans to cancel or settle legal actions.

This part of the bill is aimed at forcing Kaul to continue participating in a pending lawsuit seeking to repeal the Affordable Care Act. Wisconsin Attorney General Brad Schimel is one of the 20 Republican state officials who brought the suit against the federal government in February. Kaul campaigned on a promise to pull the state out of the suit, a move Evers supports.

Schimel and the other GOP plaintiffs in the case want a federal judge in Texas to throw out the entire Affordable Care Act on questionable constitutional grounds. If they prevail, as many as 17.1 million would become uninsured, according to an analysis by the Urban Institute, a nonpartisan think tank.

The Trump administration is the defendant in the case, but ― in a break with historical practice ― isn’t fighting the lawsuit. Instead, the Justice Department has asked the judge to invalidate only the parts of the law that protect people with pre-existing conditions from discrimination by health insurance companies.

California Attorney General Xavier Becerra and the Democratic attorneys general from 15 other states and the District of Columbia are defending the Affordable Care Act instead. The judge heard oral arguments in September and has yet to issue his decision.

National and state health care organizations strongly opposed the legislation passed Wednesday. The Wisconsin Medical Society, Wisconsin Hospital Association and 22 other health care companies and trade groups expressed “significant concerns” about the bill in a letter sent to state legislators Monday.