A key component of the Affordable Care Act, the health care law also known as Obamacare, led to significantly fewer hospital closures — but only in states like Colorodo that adopted that component, according to a new study from University of Colorado researchers.

The issue is whether states expanded Medicaid access, as Obamacare allowed them to do. The study, which was published in the journal Health Affairs, found that hospitals in states that expanded Medicaid were six times less likely to close than those in non-expansion states. The disparity was even more pronounced in rural areas.

“We estimated,” said Richard Lindrooth, a professor at the Colorado School of Public Health who is a co-author of the new study, “that about half the closures that occurred in states that did not expand Medicaid could have been prevented if they did expand Medicaid.”

The ability for states to expand Medicaid access to people above the poverty line is a key component of the Affordable Care Act. Colorado expanded Medicaid early on, and the expansion now covers more than 400,000 people in the state — part of the roughly 1.3 million people in Colorado who rely on Medicaid, the joint state and federal health insurance program for the low-income and disabled.

The reason Medicaid expansion had such a big impact on hospitals’ bottom lines is that many people covered by the expansion previously didn’t have insurance, Lindrooth said. That means, when those people used to go to the hospital, the hospital typically received very little — or nothing — in return for their care.

Medicaid has notoriously low payment rates to hospitals. But Lindrooth said just receiving something for those patients appears to have helped stabilize hospital finances.

“Even though Medicaid itself is not the most generous form of reimbursement, the hospitals were better off,” he said.

To conduct the study, Lindrooth and his colleagues at the Colorado School of Public Health looked at hospital closures between 2008 and 2016. States that expanded Medicaid after 2014 weren’t included, so as not to muddy the analysis. All told, Lindrooth and his colleagues examined data from 27 states that did expand Medicaid and 19 states that didn’t.

The study adds one more data point in the ongoing battles over whether to rescind or scale back the Affordable Care Act, including Medicaid expansion. Many hospitals’ profits have soared since the law was enacted, and a 2016 study found that hospitals in Medicaid expansion states did better than those in non-expansion states.

Lindrooth and his co-authors argue that their findings should serve as a warning to Congress.

“Further congressional efforts to reform Medicaid policy should consider the strong relationship between Medicaid coverage levels and the financial viability of hospitals,” they write in the study.