From Germany to Puerto Rico, the world’s insect populations are declining at an alarming rate. Scientists believe that climate change is among the factors that are to blame, but it is not always clear why some species flail in warming temperatures. As Damian Carrington reports for the Guardian, a new study of red flour beetles has revealed one way that climate change might affect the viability of insect species: when subjected to lab-induced heatwaves, male beetles were rendered practically infertile.

Researchers at the University of East Anglia divided their beetle test subjects, both male and female, into two groups. One group was kept at the insects’ optimal temperature, between 86 and 95 degrees Fahrenheit. The other beetles were exposed to temperatures that were nine to 12.6 degrees hotter than what they typically prefer.

The results of the experiment, published in the journal Nature Communications, showed that male beetles exposed to the artificial heatwave produced half as many offspring as the males in the control group. The heat seemed to disrupt mating behavior, with heat-affected males mating half as frequently as the controls, but the main stumbling block to reproduction appeared to be a dramatic decrease in sperm quantity. Among male beetles subjected to hotter temperatures, sperm production dropped by nearly three-quarters.

Females did not seem to be directly affected, but if they had been inseminated prior to the increase in temperature, their fertility fell by 30 percent, according to Karen Weintraub of the New York Times. The researchers found, in fact, that sperm from heat-affected beetles struggled to make their way through the female reproductive tract, and were more likely to die before fertilization.

Things got even worse when the beetles were exposed to a second artificial heatwave 10 days after the first, which resulted in the insects’ offspring production falling by 99 percent.

“It kind of wipes them out,” Matthew Gage, study co-author and evolutionary ecologist at the University of East Anglia, tells Carrington.

Another alarming discovery came when the researchers looked at the reproductive capabilities of male offspring sired by heatwave-exposed fathers. They found they produced 20 percent fewer offspring than the sons of the control group, and also lived several months less.

“Since sperm function is essential for reproduction and population viability, these findings could provide one explanation for why biodiversity is suffering under climate change,” says Gage.

Granted, the study is not conclusive. The experiments were performed in a lab, for one, so it is not known if the fertility of wild red flour beetles would similarly plummet during a heatwave in the wild. And not all experts are convinced that climate change is the primary driver of global insect decline. Curt Stager, an environmental scientist at Paul Smith’s College in New York, tells the Times’ Weintraub that “[g]lobal-scale insecticide usage is … a more convincing cause for a widespread, across-the-board insect decline.”

But it does seem possible that excessive heat could have at least some impact on the viability of cold-blooded critters like red flour beetles, which, as Becky Ferreira points out in Motherboard, rely on external heat sources to maintain their body temperatures. Even among warm-blooded animals, sperm is very sensitive to fluctuations in temperature. Though the hypothesis is controversial, some scientists believe that most mammals evolved to have external testes because sperm functions best at several degrees below body temperature. And a 1970 study found that fertilization rates among mice dropped dramatically after exposure to heat stress.

Even though little insects like the red flour beetle play a very big role in the Earth’s ecosystems, the new study is among the first to investigate how the fertility of cold-blooded animals is affected by increases in temperature. Beetles alone “are thought to constitute a quarter of biodiversity,” says study co-author Kris Sales, a biologist at the University of East Anglia. “[S]o these results are very important for understanding how species react to climate change.”