Earlier this month, the Trump administration announced that it would begin allowing states to require most Medicaid enrollees to work. This is bad policy meant to castigate and discipline the poor. It’s also very likely illegal.

Work requirements for Medicaid are part of the conservative effort to limit social assistance to the “deserving” poor only. Since 1965, Medicaid has provided health insurance to the needy through a partnership between the states and the federal government. The program historically offered coverage to an ad hoc list of groups deemed sympathetic, like pregnant women, children, and people with disabilities. But in 2010, the Affordable Care Act broadened Medicaid eligibility to instead cover anyone earning less than 133 percent of the poverty line — an expansion later made optional for the states by the Supreme Court.

While most states took the federal government up on the offer, conservatives recoiled from decoupling Medicaid eligibility from traditional notions of who deserves government help. Eighteen conservative-led states have refused federal funding to extend insurance to more of their residents. And much of the ensuing obsession with repealing the ACA altogether was about limiting health care access to those who are seen as really deserving it.

Though health care repeal failed, executive action by the Trump administration offers conservatives another avenue to deny health care coverage to the purportedly undeserving. Now, federal policy will permit states to require Medicaid recipients to take part in “community engagement” activities, including working, searching for work, undergoing job training, enrolling in school, or performing community service. Caregivers, pregnant women, students, and people with disabilities preventing them from working will be exempt from these requirements.

Ten states have already petitioned the administration to tie Medicaid eligibility to work, with Kentucky leading the way. This is a major change — never before has a person’s employment status mattered for their eligibility under Medicaid. The Obama administration repeatedly batted down red state requests to institute work requirements for Medicaid, determining that such a criterion was at odds with the spirit of the program.

It’s also unnecessary. For one, nearly 80 percent of Medicaid recipients are in families where at least one adult is already working, according to the Kaiser Family Foundation. Of those who are not working, most are ill, disabled, or caring for their families. Of all non-working Medicaid recipients, only 9 percent — 882,000 people — are unemployed because they could not find work or for other reasons. Work requirements will inflict demeaning new administrative supervision, along with burdensome new paperwork, upon millions of people to solve a problem that doesn’t even exist.

Work requirements could also prove particularly devastating during an economic recession. Medicaid enrollment typically swells as the economy contracts. But work requirements would lock the jobless out of coverage just at the time more people need it. The administration’s guidance says that looking for work should fulfill a state’s work requirement. But in the depths of a recession, many people give up searching for work as jobs disappear. Under the administration’s policy, those people could see their health care access disappear, too.

Aside from being bad policy, Medicaid work requirements are also legally dubious. State requests to alter Medicaid may only be granted if they promote the underlying objectives of the program. The core objective of Medicaid is to extend medical assistance to the needy. There’s no obvious way that denying medical assistance to people who are out of work furthers that objective.

To shoehorn work requirements within the scope of Medicaid’s purpose, the Trump administration points to the supposed health benefits from employment. As others have noted, there is scant evidence to back this claim up. To make its case, the administration points out that “higher earnings are positively correlated with longer lifespan.” Yes, the rich live longer than the poor. It’s hard to see how making it more difficult for the poor to get health insurance will narrow that lifespan gap.

The administration also points to data showing a link between depression and unemployment. But the causation runs in both directions: Some people are depressed because they aren’t working. Others are out of work because depression prevents them from working. It also seems likely that depression among the unemployed would only deepen after losing access to Medicaid coverage for mental health treatment.

This weak evidence bears on whether work requirements will be upheld in court. In September 2016, the Department of Health and Human Services evaluated a work requirements request from Arizona and concluded that these requirements “undermine access to care and do not support the objectives of the program.” The Congressional Research Service — Congress’s in-house think tank — also analyzed Medicaid work requirements and concluded that they were not clearly legal, and would depend on whether the agency could assemble sufficient evidence to show the requirements promoted Medicaid’s objectives.

Aside from the administration’s underwhelming health rationale, there’s another glaring legal problem: the administration and its allies in Congress effectively admitted last year that Medicaid doesn’t allow for work requirements. As House Republicans tried in vain to cobble together a bill to repeal the Affordable Care Act last March, Speaker Paul Ryan introduced a manager’s amendment that would have permitted states to impose work requirements on Medicaid recipients. The White House was fully on board with this legislation. “The work requirements are important,” then–health secretary Tom Price said. Foreshadowing the administration’s new rationale, he argued that “it’s important for folks to have a job, that they contribute not just to society but they contribute to their own wellbeing.”

The bill was never able to rally enough support to pass the House. But the fact that both House leadership and the Trump administration felt that the law governing Medicaid needed to be amended in order to allow for work requirements necessarily implies that the law as written does not support these requirements. The Supreme Court has said that when interpreting laws, there is a “general presumption” that “when Congress alters the words of a statute, it must intend to change the statute’s meaning.” If work requirements were already consistent with the purpose of Medicaid, then congressional leadership wouldn’t have needed to bother offering an amendment at all.

Others have determined that Medicaid work requirements could be legally problematic, too. Senate Democrats sent a letter to the Department of Health and Human Services arguing that work requirements are illegal — an argument that will likely be picked up by several advocacy groups contemplating bringing lawsuits.

These legal flaws may ultimately take down Medicaid work requirements. And if they do, Kentucky governor Matt Bevin has threatened to throw 480,000 people off of Medicaid by ending his state’s expansion entirely. It’s a good synthesis of modern conservative thought: if you can’t use the welfare state to breed hostility toward the poor and over-regulate their lives, then what’s the point?