Heatwaves can damage the sperm of insects and make them almost sterile, according to new research.

Scientists exposed beetles to experimental heatwaves in the laboratory, which resulted in reduced male fertility.

The effects could be passed down to the beetles' offspring.

Further work could shed light on whether climate change is a factor behind mass declines in insect populations, say researchers.

Climate change is affecting biodiversity around the world, but the drivers remain poorly understood.

"We don't know whether this explains the widely-recognised collapse in insect biodiversity and abundance, but limits on your ability to reproduce certainly isn't going to help," Prof Matt Gage of the University of East Anglia, which led the study, told BBC News.

Researchers studied beetles because their 400,000 species represent about a quarter of all known animal species. A massive decline in insects could have significant consequences for the environment.

A recent study in Germany found flying insects have declined by more than 75% over almost 30 years. Similar effects have been seen in the rainforest of Puerto Rico.

The new research, published in the Nature Communications journal, found that exposing red flour beetles to a five-day heatwave in the laboratory reduced sperm production by three-quarters, while females were unaffected.

Heatwaves halved the amount of offspring males could produce, and a second heatwave almost sterilised males.

Kirs Sales, a co-researcher on the study, said: "Our research shows that heatwaves halve male reproductive fitness, and it was surprising how consistent the effect was."

Other research has shown that heat can damage male reproduction in humans as well as other mammals.

Heatwaves are predicted to become more common under climate change, with consequences for human and animal health.