The middle of an unprecedented nationwide opioid epidemic might seem like a strange time to slash public funding for substance abuse, but that’s exactly what Republicans intend to do.

The American Health Care Act, which passed the House in early May and will soon be debated in some form in the Senate, will mark a major shift in national policy for opioid treatment, as well as for mental health, behavioral health, and substance abuse across the board. And it would come just after the Affordable Care Act began to create the first semblance of a true national safety net for those health issues.

Medicaid is the single largest source of funding for mental health and substance abuse treatment in the United States, and the Affordable Care Act’s expansion of the program to low-income adults was the first time there was some semblance of a national structure for treating mental health and substance abuse issues. Many people with severe substance abuse and mental-health issues also have low or no incomes or are homeless, and before the ACA were often ineligible for public insurance through Medicaid. So for that group especially—but also for millions of people with inadequate insurance or whose pre-ACA Medicaid didn’t cover mental health and substance abuse services—the only reliable way to receive care was when problems became severe enough to merit admission into an emergency room or institution.

Under the Affordable Care Act, low-income people at risk for mental-health emergencies, and those fighting substance abuse issues finally had a way to pay for preventative and rehabilitative services. “Basically, what that did then is create a sort of plan of care for people,” says Doug Walter of the American Psychological Association. “Rather than being cycled in and out of emergency rooms, they actually now had access through the medicaid expansion to mental health providers like psychologists who then could provide a plan of treatment.”

Beyond providing massive expansions in health coverage via Medicaid and subsidized private insurance, the Affordable Care Act also expanded previous laws that helped ensure mental-health services for those people with coverage. Prior to 2008, insurers were allowed to provide less coverage for mental health and substance-abuse services relative to other services. According to Elizabeth Stuart, a professor and mental-health research at Johns Hopkins University, back then “health insurers could say that if you need 300 inpatient days for a physical condition, that's fine, but they could say you could only have 25 days for mental health or substance abuse.” And insurers could also charge enrollees more for less. “Previously they might have had higher copays or deductibles for mental health services,” Stuart says.

In 2008, however, Congress passed the Paul Wellstone and Pete Domenici Mental Health Parity and Addiction Equity Act, which mandated that employer plans cover mental-health and substance-abuse services at the same level as medical and surgical services. The Affordable Care Act extended that parity to individual plans via its essential health benefits, and also extended it to over 20 million state Medicaid and Medicaid managed care plans via its benchmark requirements. Between enrollment in exchange plans and those Medicaid plans, the ACA provided a parity guarantee for mental-health and substance abuse services for over 30 million people, many of whom faced the most dire issues on those fronts.

The American Health Care Act would undo that. The AHCA’s provisions to sunset the Affordable Care Act’s Medicaid expansion and discontinue enhanced funding for able-bodied low-income adults would remove critical mental-health funding for those enrollees. But even for those who remained eligible for Medicaid, the bill would also create per-capita caps on funding, and establish state-optional block grants that would constrain the overall per-person funding per state—which is currently open-ended. The block grants would also cap the number of people who could enroll in a state, and would allow states flexibility to skirt parity rules and create more barriers to mental-health care for enrollees.

Most of the AHCA’s immediate effects on mental-health and substance-abuse services would come from its large changes to Medicaid, but it also has significant potential impacts on parity in private coverage. Amendments to the law allow states to waive certain federal protections for exchange plans, including essential health benefits and community rating, which means states could choose to essentially eliminate mental-health parity in exchange plans.

While the AHCA would also establish a $15 billion fund for maternity care, mental health, and substance abuse treatment, an analysis from the Congressional Budget Office found that this fund wouldn’t offset the destabilizing effects of state waivers on mental-health coverage. “In particular,” states the report, “out-of-pocket spending on maternity care and mental health and substance abuse services could increase by thousands of dollars in a given year for the nongroup enrollees who would use those services.”

Many people facing those massive spending increases or Medicaid coverage losses reached out to me via email to discuss just how the AHCA would impact them. One woman, who was insured through Kentucky’s adoption of the ACA’s Medicaid expansion, wrote:

I have a number of pre-existing conditions under the umbrella of mental illness or behavioral health: major depressive disorder, attention deficit hyperactivity disorder, and I am a recovering alcoholic. All of those are manageable with various daily maintenance, namely medication. I have been on the same medicines for 3 years and all are really helpful, especially the ADHD meds. Because I am in recovery, my psychiatrist and I decided I should try the only non-amphetamine med for ADHD: Strattera. It's amazing, except that it is $500+ without insurance ... If Medicaid expansion goes away, there is no way I can afford my medicine. Without medicine, though, I will definitely lose my jobs and serious risks associated with these conditions.

It's so frustrating: I am a hard-working person who has been sober for over 13 years. With no protections for pre-existing conditions or behavioral health, I'm left to consider working less to qualify for traditional Medicaid or trying to file for disability. But I can work and I want to work.

The AHCA’s disinvestment in mental-health and substance-abuse services would also have major effects on the places that tend to provide care. According to another reader:

Community mental health centers like the one I work at will be doubly penalized. The AHCA reduces Medicaid availability, leaving more of our clients without any medical insurance at all. So we will be serving fewer people with insurance that we can bill for services. Add to that the fact that for those clients we have who get to keep their coverage we will see reduced coverage/payments for those services. Since we can't turn anyone away for lack of ability to pay, this will gut our ability to provide core services for our clients.

Of course, these changes to mental-health and substance-abuse coverage and care don’t occur in a vacuum. The ongoing opioid crisis is the most pervasive, expensive, and deadly drug epidemic to ever hit the country, and the AHCA would unquestionably curtail federal tools for combatting it.

"We have statistics that say that Medicaid is paying for something like 35 percent to half of all medication-assisted opioid treatment,” says Walter. And the decreased funding for Medicaid would not only risk cutting in half federal funds for medication-assisted treatment, it would also decrease cost-effective preventative care that could identify and assist people before they start spiraling through addiction. As my colleague Olga Khazan reports, research indicates that at least some of the opioid crisis is created—and then exacerbated—by widespread mental-health issues like depression. So the AHCA would be something of a double whammy: diminishing both the prevention and the crisis-response functions of public health.

That would hit hardest in the states with the worst fortunes already, states like Kentucky. According to a commentary in the New England Journal of Medicine by researchers Peter Friedmann, Christina Andrews, and Keith Humphreys, “in 2015, the 15 counties with the highest mortality from opioid-related overdose were all predominantly rural, and almost all were located in Kentucky and West Virginia — both states that have expanded Medicaid. Repeal would abruptly reverse the dramatic insurance expansions that have occurred in these and other states, revoking coverage for medication treatment for tens of thousands of rural Americans with opioid use disorders in the midst of an escalating epidemic.”

The opioid crisis is just one component in a larger epidemic of “deaths of despair” from drugs, alcohol, mental-health disorders, and suicides that is sweeping through swathes of America. For many white Americans, especially those in rural areas, that epidemic of despair has already erased the one central promise about health care in America: that parents on average can expect their children to enjoy longer lifespans. These are the kinds of diseases that necessitate a stronger mental-health and substance abuse substance mobilization—perhaps orders of magnitude larger and more well-funded than it is now—yet Republicans in Congress seem intent on dismantling the structure that does exist.

“These members of Congress are coming up to me and my colleagues here at APA and saying 'my district or my state is in a real crisis, what should I do,?'” Walter told me. “Yet they still proceed to move forward with it. That's what's frustrating for us.” What happens in the Senate is still anyone’s guess, but should that chamber pass the AHCA or a law like it, it’s likely those crises will only grow more severe.