Image copyright Getty Images

The global health of insect populations is far more complicated than previously thought, new data suggests.

Previous research indicated an alarming decline in numbers in all parts of world, with losses of up to 25% per decade.

This new study, the largest carried out to date, says the picture is more complex and varied.

Land-dwelling insects are definitely declining the authors say, while bugs living in freshwater are increasing.

Reports of the rapid and widespread decline of insects globally have caused great worry to scientists.

Image copyright Getty Images Image caption Mayflies have benefitted from cleaner water legislation

The creatures are among the most abundant and diverse species on the planet and play key roles, from aerating the soil to pollination and recycling of nutrients.

Case studies, such as one from nature reserves in western Germany, indicated a dramatic fall, with around a 75% decrease over 27 years.

Many other, similar reports have followed.

But many of these were specific to a region or a species.

This new study, the largest on insect change to date, aims to give a more complete understanding of what's really happening to bugs worldwide.

Drawing on data from 166 long-term surveys across 1,676 sites, it paints a highly nuanced and variable picture of the state of insect health.

Image copyright Getty Images Image caption Grasshoppers are one of the species to have suffered significant declines

The compilation indicates that insects like butterflies, ants and grasshoppers are going down by 0.92% per year, which amounts to 9% per decade, lower than many published rates.

This is not as bad as previous reports but the authors stress that it is still substantial.

"That is extremely serious, over 30 years it means a quarter less insects," said lead author Dr Roel Van Klink, from the German Centre for Integrative Biodiversity Research.

"And because it's a mean, there are places where it is much worse than that."

Many people have an instinctive perception that insects are decreasing - often informed by the so-called "windscreen phenomenon", where you find fewer dead bugs splattered on cars. The researchers say it's real.

"Many insects can fly, and it's those that get smashed by car windshields," said Prof Jonathan Chase, another author from the German Centre for Integrative Biodiversity Research.

"Our analysis shows that flying insects have indeed decreased on average."

Image copyright Oliver Thier Image caption Water-based insects such as common water striders have increased in numbers

"However, the majority of insects are less conspicuous and live out of sight - in the soil, in tree canopies or in the water."

The losses were strongest in the US West and Midwest and in Europe, especially in Germany.

Trends in Europe have become more negative in recent years, with the biggest declines since 2005.

However while many land-based species are declining, the new study shows that insects that live in fresh water, like midges and mayflies, are growing by 1.08% per year.

This positive trend was strong in northern Europe, in the western US and since the 1990s in Russia.

The researchers believe this is because of legislation that has cleaned up polluted rivers and lakes.

However the increase in water based insects will not compensate for land losses.

"They are just a fraction of land based insects, not more than 10%," said Dr Van Klink

"The area of freshwater we have on earth is just a small percentage of the total land mass, so the numbers of freshwater insects will never be able to compensate for the terrestrial insects."

The scientists say there is no smoking gun on insect declines but they find the destruction of natural habitats due to urbanisation, to be key.

This finding about habitat destruction has been echoed in other major pieces of research on biodiversity, including last year's IPBES Global Assessment.

Image copyright Gabriele Rada Image caption A European orchard bee helping to pollinate some flowers

The overall picture is complex - even in close geographical areas, some insects can be doing well next door to members of the same species who are struggling.

Ann Swengel, another author on the paper has spent more than 30 years studying butterflies in parts of the US.

"We've seen so much decline, including on many protected sites. But we've also observed some sites where butterflies are continuing to do well," she said.

"It takes lots of years and lots of data to understand both the failures and the successes, species by species and site by site."

While the findings are complicated the authors believe they offer hope for the future.

"We believe that because we see these increases in fresh water insects, that are related to legislation being put in place, it makes us hopeful that if we put in place the right types of legislation for land insects we can also make them recover," said Dr Van Klink.

"The nice thing about insects is that most have incredibly large numbers of offspring, so if you change the habitat in the right way we will see them recover really fast."

The study has been published in the journal, Science.

Follow Matt on Twitter.