The dome of the Capitol in Washington. (Jonathan Ernst/Reuters)

Republicans have ripped a big hole in Obamacare. But there is a way to avoid chaos in the health-insurance markets on which millions of Americans depend, if states act quickly to undo the damage.

Democrats based Obamacare on a careful trade-off. The government would no longer tolerate insurance companies denying sick people coverage or needed care. But Congress would also mandate that all Americans carry adequate health-care coverage, as long as they could afford it, in order to ensure that people did not sign up for insurance only when they got sick. With both healthy and sick people paying into the insurance pool, medical risk would be spread broadly and everyone's premiums would be reasonable. If, on the other hand, healthy people opted out, premiums would be much higher, risking instability and even an insurance-market "death spiral."

The second course is the one Republicans are now choosing. GOP senators approved a tax bill that would repeal the individual mandate without also repealing the more-popular protections for sick people. Nonpartisan experts project that this would cause premiums to spike 10 percent and result in 13 million fewer people with coverage. Harder to model is how insurers might react; many would no doubt be tempted to quit Obamacare markets that Republicans have tried to sabotage over and over. Some, perhaps many, Americans might end up living in "bare counties" — in which no insurer is selling coverage — not because Obamacare was failing but because Republicans would not allow it to work.

There is a relatively simple solution, if states are willing to embrace it. They can fill the gap by passing their own individual mandates that apply within their borders, keeping the essential elements of the Obamacare system intact as far as their jurisdiction extends. In fact, states could make Obamacare work better than it had before, applying a larger penalty than the relatively small one that people have so far faced for skipping out on their responsibility to keep themselves covered. This would encourage more young and healthy people to enter the insurance market, thereby restraining premiums and boosting enrollment.

There would be challenges. States would have to move very quickly to reassure insurers before the 2019 enrollment season. New mandates would have to pass through state legislatures, a tough and perhaps lengthy political process. States that do not collect income taxes would have to devise some minimally onerous way to charge penalty payments. Political and ideological opposition means that many Republican-led states are more likely to choose chaos than they are to fix Obamacare. The result would be a further bifurcation of the U.S. health-care system into states that prioritize expanding coverage and those that prioritize attacking Obamacare.

But the bottom line remains: Not everyone must suffer from Congress's irresponsibility. States can fix the problem Republicans are creating. They should do so, now.