The Affordable Care Act is likely reducing the country’s medical bills. A new report from the Urban Institute provides strong evidence that the law is directly lowering total health-care spending, even as it expands coverage to unprecedented levels. The report shows that projected national spending on medical services, doctors, drugs, and devices between 2014 and 2019 is now $2.6 trillion less than what was projected when the ACA was passed in 2010, and $2.1 trillion less than pre-ACA estimates. Most of this decrease in spending is likely due to external factors such as the sluggish economic recovery—people generally spend less when they have less, even on health.

The report suggests the ACA further reduced health spending even as the recovery sped up, partly because insurance companies are spending less. But the reduction in national spending does not only represent the increases in efficiency and affordability that the law promised. Rather, some of it is attributable to a ruling that hurt millions of Americans and excluded them from the benefits of the law.

It has been difficult to assess the ACA’s overall affect on current and future health spending because the recession has depressed long-term spending by trillions of dollars. In 2010, the Centers for Medicare and Medicaid Services predicted that cumulative health-care spending between 2014 and 2019 would be $23.7 trillion. That estimate factored in the ACA and assumptions about the state of the economic recovery. Every year since, CMS has revised that number down, but it has not had the data to tease out how much of the decrease was mediated by the recession and how much was attributable to the potential cost savings of the ACA.

The Urban Institute’s recent revision of the latest CMS numbers, along with data it cites from the Altarum Institute, is the first evidence that policy additions from the ACA are actually influencing the spending decrease. The new report forecasts cumulative spending from 2014 to 2019 at $21.1 trillion, a $2.6 trillion reduction from those original CMS predictions in 2010. That reduction is spread across a number of major insurance payers, including Medicare, Medicaid, and private insurance.

Medicare spending is now projected by the Urban Institute to be $455 billion lower than baseline projections, and the report pins some of this decrease to policy changes, including the Budget Control Act of 2011, which imposed a blanket reduction in Medicare payments. The data also tracks overall decreases in payments per enrollee, which are probably heavily affected by the economy, but could also be signs of real changes in how patients use their insurance plans or how those plans pay providers. For private insurance, the report found a decrease of more than $600 billion compared to baseline estimates. While this is also likely attributable to the slow recovery, the Urban Institute presents increases in generic drug prescriptions and a shift to higher deductibles and cost sharing as potential policies that also reduced costs. These policies are core features of the ACA.

The largest contributor to the decrease in forecasted health-care spending is Medicaid, with an overall reduction of $1 trillion for cumulative spending from 2014 to 2019. This decrease is the most obviously related to policy, but not one the ACA’s champions intended or would cheer. In the 2012 Supreme Court decision NFIB v. Sebelius, the Court severed the enforceability of the ACA’s Medicaid expansion to all people under a certain income threshold, thus making the expansion optional. Up until that point, Medicaid was mostly a program for poor children and their parents, but the intended expansion was a final piece of the ACA’s overall vision, finally expanding coverage to low-income adults who were childless and healthy. The Kaiser Family Foundation reports that 19 states have rejected the expansion, a decision that leaves millions of adults in a “coverage gap” with little to no affordable health-insurance options.

Obviously, a ruling that effectively denies ACA coverage for millions of Americans will result in lower spending than originally expected. But that’s not exactly in line with the original intent of the bill, especially given that the people in the health-insurance “coverage gap” are likely to be poor people of color—the kind of people most in need of coverage in the first place.

The ACA has reduced out-of-pocket spending—premiums, uninsured payments, copays, or coinsurance all paid by an individual instead of an insurer—but the magnitude of that change is in flux. The fact that Urban Institute’s projections suggest that out-of-pocket spending increased by $2 billion over the CMS 2014 projections might be cause for worry, especially as private insurance premiums look like they’ll get bigger over the next year. The report’s graphs show current out-of-pocket projections steadily decreasing relative to original projections over the next three years, but if market places are shaken up or continue to struggle to enroll healthy young adults, those curves may change.

For proponents of the ACA, the Urban Institute study shows that the law can be viable from an economic perspective. Data finally shows that Obamacare is reducing health spending, one of its original stated goals. But as long as a disproportionate amount of those savings come from a ruling that gutted a major coverage provision, and as long as the savings aren’t felt in beneficiaries’ pockets, the ACA still has work to do.