The three longest-living counties were all in Colorado: Summit, Eagle, and Pitkin, which are home to wealthy, outdoorsy enclaves such as Vail and Breckenridge. There, people live until they’re about 86, on average.

Interestingly, the study finds that the risk of dying under age 5 dropped in all counties since 1980, possibly thanks to programs that target improving the health of infants and children. Meanwhile, the risk of death between the ages of 25 and 45 rose in about 12 percent of all U.S. counties.

The authors found that much of the disparity in life expectancy was explained by risk factors like obesity, physical inactivity, hypertension, smoking, and diabetes, but that poverty, education, and unemployment also play a role.

That could be why eight of the 10 counties with the largest decreases in life expectancy since 1980 were all in lower-income areas of Kentucky. According to the study, the counties with the largest decreases in life expectancy between 1980 to 2014 were:

Owsley County, Kentucky (-3 percent)

Lee County, Kentucky (-2 percent)

Leslie County, Kentucky (-1.9 percent)

Breathitt County, Kentucky (-1.4 percent)

Clay County, Kentucky (-1.3 percent)

Powell County, Kentucky (-1.1 percent)

Estill County, Kentucky (-1 percent)

Perry County, Kentucky (-0.8 percent)

Rounding out the bottom 10 were Kiowa County in southwestern Oklahoma, with a 0.7 percent decline in life expectancy, and Perry County, Alabama, with a 0.6 percent decline.

Kentucky has one of the highest rates of death from drug overdoses, with about 30 deaths per 100,000 people. Owsley County is the country’s poorest white-majority county, according to a 2016 analysis by Al Jazeera, with about 45 percent of its roughly 4,500 residents living in poverty. The decline of coal mines and tobacco fields have battered the county, whose population peaked in 1940. (Indeed, the JAMA study authors acknowledge that part of the life expectancy trends might be due to healthy people moving away from blighted areas, and “high-risk” people remaining in them.)

In an emailed response to the study, Doug Hogan, spokesman for the Kentucky Cabinet for Health and Family Services, said, “This is our number one public health issue in Kentucky. The causes are multifaceted, but began with prescription opioids and have progressed to heroin and illicitly obtained fentanyl. Extensive and coordinated efforts are in place including broader prevention measures, expansion of treatment options and an array of harm reduction strategies. Unfortunately, there is not an easy or quick solution.”

Although opioids explain some of the inequality in life expectancy, experts say poor diets and financial strain are also major reasons for the worsening health of less-educated, white Americans. In parts of Appalachia, for example, more people are dying of heart disease now than were in 1980.

“The inequality in health in the United States—a country that spends more on health care than any other—is unacceptable,” Christopher Murray, director of the Institute for Health Metrics and Evaluation, said in a statement. “Every American, regardless of where they live or their background, deserves to live a long and healthy life. If we allow trends to continue as they are, the gap will only widen between counties.”