Five years after the Affordable Care Act took effect, the health-insurance overhaul has narrowed coverage gaps between the rich and poor, according to new research.

The health-care law erased 44% of the coverage gap between many poor Americans without health insurance and the few rich Americans without it, according to a study the National Bureau of Economic Research distributed on Monday. The law’s provisions, especially its broadening of Medicaid programs, closed coverage gap between whites and minorities by 27%.

Coverage disparities shrank by 45% between married and non-married Americans and by 44% across age groups, according to U.S. Census Bureau data crunched by researchers at University of Kentucky, the University of Pennsylvania and Georgia State University.

The Affordable Care Act (ACA), dubbed Obamacare, imposed health insurance market reforms, subsidized certain health plans and encouraged states to adopt broadened Medicaid programs for low-income residents beginning in 2014.

The law took effect after heated debate and a lawsuit that travelled all the way to the Supreme Court and ended with a 5-4 vote upholding the law. The researchers said their findings would be “extremely valuable” for the ongoing debate.

Don’t miss: This seemingly innocuous life event can double your risk of filing for bankruptcy

About 20 million people gained coverage in the wake the law and 37 states have adopted the expanded Medicaid program, said the Kaiser Family Foundation, an organization studying health care policy, which said Obamacare has achieved “historic gains.”

Skeptics say the Obamacare plans are poor quality, too expensive and the wrong way to use government money to address America’s health care problems. The study acknowledges ACA’s murky outlook, despite the gains. Last year, a Texas federal judge ruled the ACA was unconstitutional.

The ACA imposes a tax penalty for people who lack insurance. However, Republican lawmakers included provisions in a 2017 tax-code overhaul saying people without insurance didn’t have to pay money if they lacked coverage.

In response, U.S. District Judge Reed O’Connor said the law could not stand without the penalty. The case is being appealed, but the Trump administration says the judge’s decision should be affirmed. The case is now before the Fifth Circuit Court of Appeals; the lawsuit is destined for the Supreme Court as early as next year, observers say.