Climate change could drive up suicide rates, leading to tens of thousands of additional self-inflicted deaths in the United States and Mexico by midcentury.

That’s according to a new paper in Nature Climate Change from researchers at Stanford, the University of California, Berkeley, and other institutions, who sought to pin down the role of high temperatures in the long-observed rise in suicides during warmer months. By analyzing decades of historical data across thousands of cities or counties and attempting to control for other factors, they concluded that 1 ˚C increases in monthly average temperatures increase suicide rates by 0.7 percent in the United States and 2.1 percent in Mexico.

Under the UN climate panel’s “business as usual” emissions scenario, global surface temperatures could rise 2.5 ˚C by 2050 in the United States and 2.1 ˚C in Mexico, resulting in around 9,000 to 40,000 additional suicides over that period in the two nations.

The driving mechanism isn’t certain, but the paper says one hypothesis is that high temperatures directly affect mental well-being “perhaps due to side effects of thermoregulation.” In other words, blood flow patterns in the brain could change as the body works to maintain its temperature within a certain range.

In an effort to evaluate whether high temperatures were implicated in mental well-being, the researchers analyzed data from more than 600 million geotagged Twitter posts, and found that each additional 1 ˚C in monthly average temperatures increases the likelihood of “depressive” language in tweets—like “lonely,” “trapped,” or “suicidal”—by as much as 1.35 percent.

The paper joins a growing body of research finding that climate change will have wide-ranging impacts on human health and well-being. Earlier work by two of the authors, Marshall Burke at Stanford and Solomon Hsiang at Berkeley, concluded that it will also significantly increase violence around the world (see “Hot and violent”).

“Now we see that in addition to hurting others, some individuals hurt themselves,” Hsiang said in a statement. “It appears that heat profoundly affects the human mind and how we decide to inflict harm.”