The failure of President Donald Trump and congressional Republicans to repeal the Affordable Care Act could lead to an ironic result: the expansion of government-run health care.

The Affordable Care Act provides generous federal funding to states that expand their Medicaid programs starting in 2014, but 19 states led by Republicans or by divided partisan control of their governments declined to do so after a 2012 Supreme Court ruling made it optional.

Now that the federal effort to repeal and replace “Obamacare” is dead, states that turned down those federal dollars to cover their poorest residents may revisit the idea to open up Medicaid ― which is jointly managed and financed by the federal and state governments ― to more people.

The Republican-led Kansas Senate passed a bill Monday to expand Medicaid in the Sunflower State, following passage by the majority-GOP Kansas House last month. This legislation had been moving before the collapse of the congressional repeal effort, but it illustrates interest in red states in covering more people using Affordable Care Act funding. Republican Gov. Sam Brownback opposes the bill, however, making its fate uncertain.

Also Monday, one Democrat began to take action in the aftermath of Trump’s failed bid to undo Obamacare.

Virginia Gov. Terry McAuliffe, stymied by the GOP-led legislature in his attempts to enact Medicaid expansion in his commonwealth after taking office in 2014, announced Monday he would renew his push to get the legislature to adopt the policy now that Trump and national GOP leaders like House Speaker Paul Ryan (Wis.) have moved on from repeal.

“President Trump’s attempt to repeal the Affordable Care Act failed and even Speaker Ryan has said that Obamacare is the law of the land for the foreseeable future,” McAuliffe said in a news release. “I’m asking the General Assembly to work with me to pursue Medicaid expansion and put this funding to work for our most vulnerable Virginians.”

McAuliffe campaigned in support of Medicaid expansion, so his statements aren’t surprising. But his thinking could spread to even Republican governors and state legislators, said Diane Rowland, executive vice president of the Henry J. Kaiser Family Foundation.

“There is now a motivation to many of those states who were on the fence to take it,” Rowland said. “They could cover a lot of low-income people with a lot of federal money.”

Another ironic twist is that having a Republican in the White House could make state GOP leaders more willing to negotiate with federal health care authorities on so-called waivers from standard Medicaid rules that would let states nudge their Medicaid expansions in more conservative directions. States like Arkansas and Indiana made such arrangements with President Barack Obama’s administration, but didn’t always get what they wanted.

“They now have an administration that’s very willing to do waivers and set up some of the kinds of things they wanted to have in an expansion, like a work requirement,” Rowland said.

Trump’s top Medicare and Medicaid official, Seema Verma, is a strong proponent of state innovation in Medicaid and was a key figure in the development of the Healthy Indiana Medicaid expansion that Vice President Mike Pence implemented while governor of that state.

The Trump administration would be more willing to allow states to impose rules on Medicaid recipients that the Obama administration wouldn’t approve, such as work requirements, higher monthly premiums and higher costs when patients use their Medicaid benefits.

Georgia Gov. Nathan Deal, a Republican, also indicated Monday that the demise of the federal repeal effort may change his thinking about Medicaid.

“Those are areas that some would like for us to explore, and I think we have the possibility of doing that within the context of our Medicaid program,” he said, the Atlanta Journal-Constitution reported. Deal did not specify that he would take up the Affordable Care Act’s Medicaid expansion, but expressed an interest in seeking Medicaid waivers from the federal government.

Expansions in the other 31 states and the District of Columbia strongly contributed to the historic reduction in the national uninsured rate, and those localities saw greater success than non-expansion states.

In addition to extending coverage to more people, these Medicaid expansions have been shown to reduce premiums for private health insurance by moving sicker, costlier people to Medicaid instead, and to stimulate local economies as federal dollars flow through the state to medical providers and others.

Under the Affordable Care Act, the federal government pays no less than 90 percent of the cost to cover newly eligible people, which includes anyone earning up to 133 percent of the federal poverty level, or about $16,000 a year for a single person.

Movement could pick up now that the Affordable Care Act seems secure from repeal, including in states that had actively debated Medicaid expansion in recent years but not gone through with it, such as South Dakota and Maine.

In Maine, GOP Gov. Paul LePage has vetoed several bills to expand Medicaid passed by the state’s divided legislature, most recently last year. But Mainers will get a chance to vote on expansion in a referendum this November.

In 2015, South Dakota Gov. Dennis Daugaard (R) ended his opposition to broadening Medicaid expansion and began work on an unusual proposal to expand Medicaid while also seeking to improve health care access for Native Americans in his state who have Indian Health Service benefits.

Daugaard courted the state’s majority-GOP legislature and coordinated with the Obama administration in drafting his plan. But the governor dropped it at Pence’s urging shortly after Trump won the presidential election last year, a decision he may reconsider now that repeal isn’t looming.

CORRECTION: This article previously misstated that Democrats controlled Maine’s legislature; they control Maine’s House, and Republicans control its Senate.