IN ancient pine woods, in the stumps of felled or rotten tree stumps, you will find the ideal habitat for one of Scotland’s rarest species.

As rotten holes fill with rainwater, decaying matter and micro-organisms create the perfect organic “soup” for the pine hoverfly - an insect considered one of the most important for Scotland’s biodiversity.

The pine hoverfly is now only found at one or two sites in the whole of the country, which experts say is due to declining habitats largely down to human activity.

“The pine hoverfly is not a lynx or a bear, so it doesn't get quite the headlines perhaps as some of the big species do,” said Dr David Hetherington, an ecologist in the Cairngorms.

“The thing about pine hoverfly actually is it is a useful indicator of the health of the environment.

“They have very specific habitat, they need to be breeding in rotten tree stumps, and the fact that they are almost disappearing indicates that the forests are becoming small, fragmented.”

Despite not having the star quality of the big apex predators which once roamed the Scottish Highlands, efforts to save the pine hoverfly and its habitat are underway, Dr Hethrington said.

However, the insect is just one of a whole host of species which are currently under threat of extinction in Scotland.

Ahead of Endangered Species Day next Friday, The Herald on Sunday explores the changes to Scottish flora and fauna, looking at what animals once paced our forests floors, as well as the efforts being made now to save all creatures great and small.

Around 5,000 years ago the Scottish landscape was at the peak of its tree cover, yet through human action this began to drastically change. Logging, invasion, the industrial revolution and agriculture have all contributed to the fragmentation and destruction of Scottish woodlands, resulting in what experts call ecological wastelands.

The reduction of these woodlands, such as the Caledonian pinewoods, are causing a “whole raft of species losses”, such as red squirrels and capercaillies but also fungi and lichens, according to Dr Paul Walton, head of habitats and species at RSPB Scotland.

“Without fungi there’s no woodland,” he said. “Fungi, lichens, invertebrates - insects and other smaller non-vertebrate animals - these are the pollinators that we depend on for our crops, but also the pollinators for all wildflowers that we see.

“You cannot save the big iconic stuff, the charismatic megafauna as we call it, without working for the smaller plants, fungi, insects and other invertebrates that actually support and make up the ecosystem, they are utterly essential.

“You cannot do one without the other.”

Scottish peatlands, and the species which dwell there, have also suffered from the effects of human action such as drainage and agriculture, Dr Walton added.

For 20 years RSPB Scotland has been working to restore these peatlands and now they have the full support and recognition from the Scottish government.

Dr Walton said: “It is obviously a massive step in the right direction and should be an exemplar for what we need to do across ecosystems and habitats in this country.”

One such habitat is the Scottish marine environment which, according to Dr Walton, is often forgotten about.

“We have internationally important and globally recognised seabird populations in Scotland, which are in real trouble,” he said. “We have seen massive declines in, for example, Kittiwake populations.”

Dr Walton used to study Kittiwake populations in the 1990s, and upon returning to one of his research sites in the Shetland Isles recently he discovered the colony was gone.

“It broke my heart actually. If you have told me that was going to happen in 1990 I would never have believed it was possible,” he said.

This decline is believed to be linked to climate change, as the Kittiwakes food source, the sandeel, has declined following the scarcity of its own food source - plankton.

Back on land, rewilding projects are being proposed to restore Scotland’s ecosystems to their former states.

Predators such as wolves, bears, lynx and wildcats are all known to have roamed the Scottish highlands in the last few thousand years, but their elimination through hunting and habitat loss has had a real effect, according to Pieter-Paul Groenhuijsen, general manager at Alladale Wilderness Reserve.

“There is no natural predator anymore, deer populations have run out of control,” said Mr Groenhuijsen.

“As soon as the predator is removed by human activity the whole ecosystem ends up off balance and now it’s on the brink of collapse because the caretaker is removed.”

Alladale Wilderness Reserve is part of The European Nature Trust (TENT) project to rewild the Scottish Highlands. The reserve is currently in discussion about authorising a controlled release of wolves.

Mr Groenhuijsen said: “It needs to be very clear it’s not a reintroduction, its a controlled release of two packs of wolves, all the animals would be neutered.

“The project would be to assess the effect that they have on deer grazing behaviour, because deer now can graze undisturbed and graze everything to bits, with wolves in the area that behaviour would dramatically change.

“They would be on guard all the time and that would allow far more plants and trees to establish themselves.”

Despite the increase in support for rewilding efforts in some circles (a rewilding conference will be held in Stirling this September), campaigners say public enthusiasm may not be at the same level.

Dr Hetherington, who also campaigns for public understanding of the once native lynx, said the public often fill in their lack of understanding about Scotland’s native predators with misconceptions.

“There are quite a lot of assumptions made about lynx because to be honest quite a lot of people in this country haven't got a clue about lynx, it’s a very shy and elusive animal that we don't have much cultural awareness of,” he said.

Dr Hetherington emphasised he is not necessarily campaigning for the reintroduction of lynx - which are believed to have died out in Scotland around 4,000 years ago - but he said it is possible a reintroduction could significantly benefit the country, both ecologically and economically.

The Forestry and Land Commission currently spends around £5 million annually on deer management costs, which includes the culling of around 38,000 deer.

“Having a population of 400 lynx, killing roughly 50 deer per year that's at least 20,000 deer getting predated on, which could be quite a useful thing economically and ecologically,” Dr Hetherington said.

However, current conservation efforts to save an existing Scottish feline species have revealed worrying results.

The Scottish wildcat may look similar to their domestic cousins, but they are in fact double the size, ferocious, and known as a super-predator.

Due to decades of inbreeding with feral domestic cats, however, conservationists say hybridisation - the mixing of feral and wildcat genes - is now evident in all Scottish wildcats.

“It’s not just that you get something that is half wildcat, half domestic cat, what happens is you get a hybrid-cat mating with another hybrid-cat, or mating with another wildcat, or another feral cat, and before you know it you've got a right mix of individuals with varying ancestry,” said Dr Roo Campbell, priorities area manager for Scottish Wildcat Action.

Despite this hybridisation Dr Campbell said there are still some wildcats with “majority wildcat heritage”, which are potentially “the last vehicle of Scottish wildcat DNA”.

To try and save the wildcat, Scottish Wildcat Action has neutered around 200 wild feral cats in an effort to prevent further hybridisation, but following an analysis by the International Union for Conservation of Nature (ICUN), it was discovered there are too few wildcats left for the population to survive, Dr Campbell said.

An action plan by Scottish Wildcat Action, which began in 2015, aimed to establish key protection areas, the numbers of wildcats left in the wild and what can be done to keep their populations stable.

Now heading towards the end of the project they are focusing on “population reinforcement”, through captive breeding and release programmes.

Dr Campbell added the preservation of Scottish wildcats is vital and, given they often appear on Scottish clan crests, they represent a true Scottish symbol.

“They are like the symbolism that they are the true wild animal and we are losing part of the wilderness,” he said.

“Also we call them Scottish wildcats, I suppose for Scotland it’s one of the species that we retained and England lost. I suppose, it also becomes a Scottish symbol.”