Because John McCain landed the final blow, he has gotten the lions’ share of credit for killing the Republican health care bill, a “skinny” repeal that would have eliminated Obamacare’s individual mandate and partially repealed the employer mandates, causing premiums to spike and increasing the ranks of the uninsured by 15 million. But actual credit belongs to the lawmakers who stood against the bill from the start, as well the activists who drove the bulk of opposition to the Republican Party’s effort to gut the Affordable Care Act.

Had Republican Sens. Lisa Murkowski of Alaska or Susan Collins of Maine surrendered to pressure from their colleagues, the bill would have passed. Had conservative Democrats in Trump-friendly states—lawmakers like Joe Manchin of West Virginia, Joe Donnelly of Indiana, and Heidi Heitkamp of North Dakota—broken ranks with their colleagues, the bill would have passed. And if activists weren’t as mobilized and aggressive in confronting lawmakers on both sides of the aisle, the unified opposition needed to defeat the bill in any of its iterations may not have existed in the first place.

But there’s a bit more to the story, an important wrinkle. The part of Obamacare that saw the most support—the part that formed the foundation of its defense—was the Medicaid expansion. By expanding the program, the Affordable Care Act created a large constituency for its preservation, one that even included Republican governors like Brian Sandoval in Nevada and John Kasich in Ohio, who cared more about their constituents than fulfilling the national Republican Party’s campaign promises. And looking forward from this fight, durability of Medicaid provides a lesson for advocates of universal health coverage. The path to enduring reform isn’t through the exchanges or other market-based policies—it’s through government guarantees.

It’s worth repeating that “Obamacare repeal” was something of a misnomer for the larger Republican health care effort. In both the Senate’s Better Care Reconciliation Act, crafted in June, and the American Health Care Act passed by the House, the most significant cuts were for Medicaid. Friday morning’s failed “skinny” repeal didn’t contain Medicaid cuts—it focused largely on the the ACA’s regulated insurance markets—but it would have opened the door to a bill that did, had the Senate passed it and Congress progressed to writing a final version in conference committee.

Which is to say that the real threat of Obamacare repeal was to Medicaid, which reaches 70 million Americans and provides a variety of services, from health insurance for the poor to care and assistance for the elderly and disabled. And it’s that threat, more than anything else, that mobilized and galvanized the public. When activists with the disability advocacy organization ADAPT crowded Senate offices in an act of civil disobedience, they cited Medicaid as the reason for their protest. “The American Health Care Act caps and significantly cuts Medicaid which will greatly reduce access to medical care and home and community based services for elderly and disabled Americans who will either die or be forced into institutions,” read an organizer statement.

Nearly every Republican in both chambers of Congress was willing to go through with cuts that would drop 14 million people from Medicaid and unravel the program over the long term. It would have been a historic reduction in the scope of the social safety net. There’s almost no doubt that the prospect of those cuts stiffened the spines of conservative Democrats who may have worked with Republicans under different circumstances. It would be one thing for say, Joe Manchin, to back a repeal bill that cut taxes and damaged the exchanges. It was something very different—for both his political future and his constituents’ well-being—to back a process that would have cut health coverage for hundreds of thousands of West Virginians. Indeed, those cuts even gave some Republicans pause enough to temporarily derail the process.

If the Democrats were paying attention, the extent to which Medicaid was the key to defending the Affordable Care Act should be a glowing neon sign. As the party looks to fix real problems with the law, bolstering and expanding Medicaid should be a top priority. Because of its association with the poor and disabled, it will likely face continued assault from hostile lawmakers. Weakening that association, and making it a broad-based program like Medicare, will strengthen it, with the added advantage of expanding the constituency for improvement. In practical terms, that means first pushing for every state—no matter who controls the statehouse—to adopt the Medicaid expansion (19 states have yet to take that step), which would help close a good deal of the nation’s remaining coverage gap.

It also means taking a page from the Nevada Legislature and exploring ways to turn Medicaid into a de facto public option for people on the health care exchanges. Democrats in that legislature passed a bill that would have allowed individuals and businesses to buy into Medicaid, strengthening the program by increasing the number of beneficiaries and alleviating the problem of choice and cost on the individual market. Boosting subsidies or enticing private insurers becomes less critical when consumers have Medicaid as a low-cost option. What’s more, it’s clear that when voters receive Medicaid, they like it, giving it a powerful set of advocates and opening the political space for forward movement with the program. Looking to the long term, a combination of buy-ins and expansion could make Medicaid the vehicle to universal health care that many on the left see in Medicare.

Despite Friday’s setback, the GOP remains committed to repealing the Affordable Care Act and scaling back the social safety net. Which is to say that it’s still too early to call that effort “dead.” But it is a good time for Democrats to start thinking about the future of health reform. And if there’s any lesson to the fight against Obamacare repeal, it’s that the future is Medicaid.