It’s not unusual for the US fare to much worse than other rich countries—and at times, middle income ones, too—when it comes to public health metrics.

Among the most unfortunate of the US’s numerous poor statistical showings is in infant deaths. According to the latest available United Nations data—each country’s data are from some year between 2010 and 2015—the US ranks 30th of 193 countries in infant mortality rate, the ratio of babies that die before turning one year old. In the US, there are more than three times as many infant deaths for every 1,000 births as there are in the countries leading the list.

That said, things have been improving over the past few years in the US. According to data published recently in the American Journal of Public Health, infant mortality has fallen from 6.7 deaths per 1,000 births in 2010 to 5.9 in 2016. But those gains haven’t been evenly distributed across states, and now there’s an alarming trend showing that, in some states, infant mortality is actually on the rise again.

In 2014, many of the reforms of the Affordable Care Act went into effect, including the expansion of Medicaid, which states could decide to opt into or not. In the 34 states (plus the District of Columbia) that chose to opt in, average infant mortality rates continued the nationwide downward trend, dropping from 5.9 per 1,000 births in 2014 to 5.6 in 2016. But in the states that did not adopt expanded Medicaid, infant mortality rates stopped falling, and started to rise, going from 6.4 in 2014 to 6.6 in 2016. One particularly troubling example is Wyoming, which had one of the lowest infant mortality rates in the nation in 2015 at 4.9 deaths per 1,000 births. In 2017, that rate had risen to 5.7.

The nationwide improvement in infant mortality between 2010 to 2014 was likely thanks to the positive influence of the early provisions of the Affordable Care Act. That effect seems to have stopped in the non-Medicaid expansion states, but it continued in the others.The American Journal of Public Health study doesn’t explain exactly why, but it’s possible that this could be due to key changes introduced by Medicaid that expanded coverage to lower-income women, giving them better access to health care before pregnancy, leading to healthier pregnancies, and healthier babies.