Two months ago, things looked dire for Obamacare — and not just because Republicans in Congress were still hell-bent on repealing and replacing it. Nearly 50 counties across the United States lacked any insurers willing to sell plans on the law’s marketplaces in 2018, leaving almost 40,000 people at risk of having no options for coverage next year.

But now, after reports in the past 24 hours that the last two empty counties in Ohio and Wisconsin would be filled, the problem is gone: No counties currently lack health plans for next year.

The law seems to have healed itself, or at least staved off disaster, even as President Trump has been swearing that Obamacare would implode or threatening to nuke it himself.

What happened? It’s actually pretty simple: Obamacare provides significant federal assistance for many lower-income and middle-class Americans to buy insurance. It is explicitly designed to make coverage reasonably affordable for people, while requiring the government to pick up any excess costs.

That’s a pretty good proposition for any business.

So while Obamacare still has a monopoly problem — there are 1,340 counties, with 2.7 million customers, where only one insurer is available — its market hasn’t imploded. Instead, the design of the law itself seems to have helped bring it back from the edge. State officials also worked at the local level to provide coverage for their constituents.

“It shows how resilient the market is. The open-ended premium subsidies are an enormous carrot for insurers to go into underserved areas, even in the face of significant uncertainty,” Larry Levitt, senior vice president at the Kaiser Family Foundation, told me. “It's not a great outcome to have monopoly insurers, but it's a whole lot better than having no insurers.”

Obamacare’s shrinking empty-shelf problem, in two maps

In early June, Vox’s Sarah Kliff laid out the terrain: 47 counties from the Pacific Northwest to the heart of the Midwest had zero health plans available for 2018. The uncertainty caused by the Trump administration, which has repeatedly threatened to cut off subsidies paid to insurers, hadn’t helped matters.

But the law was undoubtedly struggling, Republicans had ample evidence to decry Obamacare’s failings as they sought to repeal it, and — most importantly — thousands and thousands of people faced a real risk that they wouldn’t be able to get insurance next year.

But those yellow spots on the map have dried up in the intervening weeks. Insurers stepped in in Washington, Missouri, and Ohio. Wisconsin and Nevada, which saw insurance companies bolt over the summer, also managed to fill their empty counties pretty quickly.

On Wednesday, Wisconsin’s insurance department said that an insurer would offer coverage in Menominee County, and then on Thursday, Ohio’s insurance department announced that Paulding County would also be covered. The last remaining bare spots on the map had been filled in.

The health care law’s design helped save its marketplace

There are two obvious explanations for the law’s recovery: State officials worked with insurance companies to persuade them to participate, and insurers were encouraged by the law’s subsidies to jump into bare counties, believing it’d be a good enough deal for them.

State leaders, who are closer to the people who would have gone without coverage if the counties remained empty, had obvious incentive to help out people in those areas. Even Republican officials were proactive. Nevada Gov. Brian Sandoval flew insurance executives into the state capital for meetings on the issue. Ohio officials negotiated with companies to find a way to convince them to step into their 20 empty counties.

State officials had a strong bargaining position, given how much insurance is still regulated at the local level, experts said.

“I think it says, ‘Don't underestimate the influence of the state insurance commissioners,’” Dan Mendelson, CEO of Avalere Health, an independent consulting firm, told me. “Or maybe, ‘Health care is ultimately locally controlled.’ There are many things states can do to entice smaller plans into the market, and that's what happened here.”

Or as Craig Garthwaite, a health economist at Northwestern University, put it: “You don’t want to piss off your state insurance commissioner.”

But perhaps on a more fundamental level, Obamacare’s design gives companies a lot of incentives to participate in the law — even in the rural areas where many of these empty counties were, which have historically been underserved.

The law provides financial assistance for people making 100 percent of the federal poverty level (about $12,000 for an individual) up to 400 percent (about $48,000). It caps the premiums that people have to pay at a certain percentage of their income; the less money you make, the lower the premium you have to pay.

So in an empty county, where an insurer doesn’t have to worry about a competitor undercutting them, companies can set premiums to cover their costs without worrying that they’ll price their coverage too high for many of their customers. It’s going to be the federal government, not a person with a subsidy, picking up much of the extra cost.

“If there is an empty county, insurers are seeing a population of people who are willing to pay at least the subsidized premium amount and no competition that severely constrains pricing,” David Anderson, a former industry official now researching at Duke University, told me. “The business case for getting into a bare county is strong because of the way the subsidies are designed for the ACA.”

It’s debatable how desirable it is for the federal government to cover that burden and how much taxpayers should be asked to pay to do so. But as a practical matter, when it comes to filling empty counties, Obamacare’s subsidy design is useful.

The exception, though, is that people who don’t receive subsidies are still subjected to whatever premium the insurer stepping into a bare county wants to charge. They are not protected in the same way, and even those just above the threshold to qualify for a subsidy — somebody making $55,000 as an individual, for example — must pay the full price.

“It’s an option in name only. It’s not like you have a ton of extra funds to pay for what’s going to be very expensive insurance,” Garthwaite said. “Just having an insurer offering doesn’t solve the problem for everyone.”

So the law isn’t entirely fixed. In the counties with only one insurer, there is also a concern about the limited plan options that customers can choose from. “When there’s a monopoly provider in the exchanges,” Garthwaite said, “we lose that ability to match with the plan that’s best for you.”

But on perhaps the most urgent question facing Obamacare that had nothing to do with Congress, the law found a way to correct its course. That once again leaves its fate largely in the hands of a hostile administration, which is inheriting an imperfect but hardly imploding law.

Join the conversation

Are you an Obamacare enrollee interested in what happens next? Join our Facebook community for conversation and updates.