With flowers that are the most comforting shade of blue, it is a rare beauty that, unfortunately, tastes as good as it looks.

Sought out by deer and sheep for its luscious lettuce-like taste and under siege from changes in land use and a changing climate, the delicate Alpine blue-sow-thistle was left tottering – literally – on a Cairngorms cliff edge.

Found in only four areas of the national park where it clings desperately to high rocky crags and mountain gullies, it faced a dire battle for survival.

The puzzle facing plant scientists was why this pretty blue flower that had become so rare in Scotland was managing to not only grow, but to thrive in Scandinavia.

And then, whether they could step in to use halt its demise, nurture it back to health and see it flourish in Scotland’s mountains once more.

That, says Dr Aline Finger, a conservation geneticist and molecular ecologist at the Royal Botanic Garden Edinburgh (RBGE), is not as simple as just plucking cuttings and seeds from their craggy locations – hard to reach as they may be - and planting them somewhere else.

Instead, nurturing the Alpine blue-sow-thistle - and dozens of other native Scottish plants facing the threat of extinction - back to health involves a slow process of study, conservation genetics and a lot of patience.

Having started their work with the delicate thistle in 1999 which has involved giving them a helping hand to pollinate and then tenderly raising them in the Edinburgh nursery, it is only now that hopes are being raised that the rare thistles might well survive and once again flourish in the wild.

This autumn, new clusters of Alpine blue-sow-thistle will be planted at carefully chosen locations in the Cairngorms, where they will be anxiously watched to make sure they survive.

Decades of work for that one plant is being replicated across dozens of other endangered species, as RBGE scientists strive to rescue Scotland’s most fragile native plants.

While some benefit from work by landowners and conservation groups to restore their natural habitat and revised land management to reduce predators who find them far too tasty, others require the much more intensive care of green-fingered scientists.

According to Dr Finger, a key problem as plant numbers dwindle due to climate change, predators and habitat change, is the lack of genetic diversity that has left plants like the Alpine blue-sow-thistle weak and less able to stage their own fight for survival.

“Genetic diversity is the basis for a species to adapt to environment, climate change, outbreak of pests and diseases,” she says. “All that needs some adaptation, and genetic diversity gives them building blocks for being able to adapt.

“The problem in many different countries across the world but also in Scotland is fragmentation of habitat, and some plants are left in very small pockets where they lose their genetic diversity.”

Last week a tiny yellow plant, dubbed ‘Goldilocks’ for its fussy requirements, became the latest Scottish native flower to be planted at the RBGE’s Experimental Garden, where researchers monitor the slow progress of a range of species in the hope of pinpointing their best chances of surviving in the wild.

In the case of the fussy Small Cow-wheat, the problems are multiple: it only grows around a host plant deep in woods or in mountain areas, needs very specific amounts of rain and moisture, and requires the help of an endangered ant to help transport its seeds.

In the RBGE laboratory, months of careful research were carried out before the plant with its tiny golden-yellow flowers could even be planted in the Experimental Garden.

“We want to make sure not making things worse,” adds Dr Finger. “Sometimes when we cross two different populations of plants that have been isolated for many generations, it might be they are no longer compatible.

“We have to make sure that when we grow them, we increase the fitness and not make it worse.

“In the nursery, we measure the plants’ fitness, height, how much they germinate how vigorous they are. Only then take the next step.

“It’s a very long process that takes years for plants to grow.”

While climate change, loss of habitat and predators often pose the greatest risk to rare species, sometimes the threat comes in a more unusual form.

Thanks to the Victorian fern craze, the Oblong Woodsia (Woodsia ilvensis) is the UK’s rarest fern, found only in five locations, of which three are in Scotland.

Work at the RBGE nursery aims to expand the remaining clusters’ genetic diversity with a view to introducing new populations.

“Even though where they grow is protected, there are no new ferns coming up and they are struggling to reproduce because they have lost all their genetic diversity.”

There are successes. The woolly willow (Salix lanata), a low growing shrub found in extreme mountain conditions, is highly endangered due to high levels of grazing.

At Corrie Fee National Nature Reserve, RBGE expertise was used to propagate over 1100 young plants from seed which were then sprinkled amongst the existing plants.

According to Martine Barge, Scottish Rare Plant Programme Horticulturist at RBGE, simply retrieving samples of ‘at risk’ mountain plants is often the first hurdle that has to be overcome.

“Some sites are very challenging,” she says. “We may have to get climbers to abseil to locations and collect seeds, and sometimes it can even be hard to know what is there unless you are dangling off a rope.

“Trying to collect plants is probably a lot more dangerous than people might think.”

Work is not confined to mountains and woodlands, however. RBGE scientists are now turning their attention to the ocean, with genetic research underway which aims to unravel the problems facing sea grass.

Important for carbon capture and home for dozens of marine species, seagrass meadows around the UK have shrunk by around 90%.

While it sounds bleak, according to Dr Finger, there is hope.

“If we had started this 200 years ago by not destroying the habitats, it would have been much easier: every species needs different treatment and it takes a lot of time and effort and there’s little we can do about that.

“But there are so many people in Scotland working on conservation and collaborations between landowners, conservation bodies and scientists - all that is really good.

“It may sound strange,” she adds, “but I am optimistic.”

BREAKOUTS Wooly willow: A dwarf willow that grows in mountainous areas is particularly vulnerable to climate change. RBGE has planted over 1000 different Coire Fee nature reserve.

Alpine blue sow thistle: Only four populations left in Scotland. Native to Scotland and not found anywhere else, there are only a few remaining on mountain ledges in the Cairngorms. It is particularly prone to being eaten by deer and sheep. Overgrazing has led to it becoming very inbred and unhealthy.

Arran Whitebean: Just two in the wild grow on Arran, while one grows at the RBGE nursery. A type of Rowan tree, it is one of the rarest trees in the world.

Oblong woodsia (Woodsia ilvensis): A tiny fern which was over collected during the Victorian fern craze, leaving tiny pockets left which are suffering from a lack of genetic diversity. The UK’s rarest fern, there are less than 100 clumps in just six populations, three of which are in Scotland.