The debate over how Donald Trump won the election has generally focused on two competing narratives: Either Trump’s rise was driven by economic anxiety — fears of jobs getting shipped overseas — or racial anxiety, against black people, Latinos, and Muslims, based on fears and stereotypes of crime, immigration, and terrorism.

But the narrow focus overlooks another possibility: public health.

A new analysis by historian Kathleen Frydl looks at the strong correlation between the opioid painkiller and heroin epidemic — which led to a record number of overall drug overdose deaths in 2014 — and the counties in Ohio and Pennsylvania that swung from President Barack Obama in 2012 to Trump in 2016. Both of these states were crucial to Trump’s victory on Election Day.

In Ohio, 26 counties reported around 20 or more drug overdose deaths per 100,000 people in 2015. In all but two of these counties, Frydl said there was at least a 10 percent surge in voters who went to Trump compared with Republican candidate Mitt Romney in 2012, a 10 percent or more drop in voters who went to Hillary Clinton compared with Obama, or both of these trends. In five counties, the shift was big enough for the county to flip from Democrat in 2012 to Republican in 2016.

And in Pennsylvania, all but four of 33 high-overdose counties followed a similar trend. In three counties, the shift was enough for a complete Democrat-to-Republican flip.

In total, eight of 13 Ohio and Pennsylvania counties that flipped from Obama to Trump had around 20 or more deadly drug overdoses per 100,000 people.

Unlike past drug epidemics, the opioid epidemic has largely hit white and rural areas. The two states suffering the most from the epidemic, based on 2014 numbers, have been West Virginia and New Hampshire, both of which are very rural and very white. And a 2014 study found that nearly 90 percent of treatment-seeking patients who began using heroin in the previous decade were white — a big shift from equal racial representation prior to the 1980s. So Trump’s Rust Belt support appears to reflect, at least partly, the unique levels of suffering in these communities.

Opioids aren’t the whole story

The opioid epidemic may only tell part of the story behind Trump’s rise, even if you’re looking only at public health issues.

As Penn State sociologist Shannon Monnat found, Trump’s overperformance compared with Romney in Rust Belt counties correlates with all sorts of declining health outcomes, including deaths due to drugs, alcohol, and suicide:

Note that, like the opioid figures, this only finds correlation, not causation. Maybe it’s not the suffering from higher drug use, alcohol consumption, or suicide rates that led to support for Trump, but rather the socioeconomic malaise that fostered these bad conditions. We can’t say for sure without a more rigorous analysis of the data.

Still, this reflects the same message: Many Trump voters, seeing their communities deteriorate, concluded that Trump at least gives them some chance for a different path forward, since he was seen by many as the agent of change — particularly from Obama’s policies — in the election.

As one Trump supporter in Ohio put it to Dylan Scott at STAT, “It’s worth a chance because nothing’s happening now. Like [Trump] says, what do you got to lose? We know what the hell we’ve been having, and it’s been continuing on. It hasn’t gotten any better.”

This wasn’t just bluster. A 2015 study found, for example, that middle-aged white people, particularly women, have seen mortality rates rise since the 1990s — for the first time in roughly a century. While researchers aren’t clear on the reasons for the rise, they suspect that rising rates of deadly drug overdoses, alcohol-related deaths, and suicide have all played a role.

Now, white Americans still come out far ahead of their counterparts of other races in many other socioeconomic measures, including income, wealth, and educational attainment. But the kind of social decay that many white Americans, especially in rural areas and the Rust Belt, reported throughout the election can be explained by the real collapse in quality of life that many of them see in their everyday lives, even if it’s not present in the economic statistics.

Add bad public health outcomes to the pile of potential causes for Trump’s rise

This doesn’t mean the public health crisis in much of the Rust Belt can be exclusively blamed for Trump. For one, post-election analyses have also linked racism, sexism, and economic anxiety to Trump’s support.

It’s likely all of these factors, along with public health, played some sort of role. Arlie Hochschild, a sociologist and author of Strangers in Their Own Land: Anger and Mourning on the American Right, provided an apt analogy for the neglect white rural Americans feel: As they see it, they are all in this line toward a hill with prosperity at the top. But over the past few years, globalization, public health crises, and other issues have caused the line to stop moving. And from their perspective, people — black and brown Americans, women — are now cutting in the line, because they’re getting new (and more equal) opportunities through new anti-discrimination laws and policies like affirmative action.

So it’s likely a complicated, nuanced story. But Americans will need to understand all of it to grasp exactly what happened on Election Day.

Watch: America’s opioid painkiller and heroin epidemic, explained