Some are as tall as a house, others are tiny with the most delicate flowers or jagged spikes, pungent aromas, feathery fronds and in all the colours of the rainbow.

And while some are a very long way from home, others have been found much closer to home, native Scots clinging to the very edge of survival.

Fragile and under-threat, as beautiful as they are rare, they are the plants which are defying the odds - and probably should not even be here.

The remarkable stories of 100 plants that have escaped almost certain extinction to, if not exactly thrive, at least live another day, have been revealed in a new publication.

In it, the extent of the efforts that are undertaken to save even the smallest species, often involving collaboration between international plant specialists, enthusiasts, government bodies and scientists using ground-breaking technology, are explained, showing the intensity of the battle to keep precious plants from being lost forever.

Produced by the Royal Botanic Garden Edinburgh, it spotlights plants held within its own collection of more than 13,500 species from around the world which can be found at its four Scottish gardens, Benmore, Dawyck, Edinburgh and Logan.

While the organisation has at least 450 species within its Living Collection that have been identified as being threatened with extinction, the new book has gathered 100 examples of plants which have mounted a stunning fightback, to those still in the grip of a determined fight for survival.

They include Britain’s rarest fern, oblong woodsia (Woodsia ilvensis), a favourite of Victorian collectors who, in a fern frenzy lasting just a few years, tore across the country ripping it up by its roots and leaving its numbers on the brink of collapse.

With just four or fewer populations of plants in Scotland and Wales, and one slightly larger population at a single spot in England, the fairly unremarkable looking fern’s preferred location on steep cliffs have left it vulnerable to being wiped out by a rock fall.

The new RBGE publication, World of Plants: Stories of Survival, reveals how plants sourced from Canada, Iceland, Norway, Russia and spores collected from UK plants and research carried out by the Edinburgh-based organisation have thrown it a modern lifeline.

As a result, RBGE’s Edinburgh site has cultivated a huge collection of the small ferns and reintroductions of the plants are being made.

The book’s author, botanist Dr Alexandra Davey, said: "We have at least 450 threatened species in the gardens, and that is probably an under-estimate because a huge number have not been assessed for conservation status.

“We could easily have filled the book with 100 conifers or 50 rhododendrons, instead we’ve looked at everything from mosses to redwood.

“We have also tried to focus on plants that are either critically endangered or endangered rather than slightly lower levels of less vulnerability.”

They include the story of woolly willow (Salix lanata), one of Scotland’s most iconic mountain plants, now restricted to a few north facing locations in the Highlands.

To make add to its woes, it is vulnerable to grazing, while successful reproduction requires separate male and female plants to be within 50 metres of each other. Some populations, such as the plants found on Ben Lawer, contain only female plants, making it functionally extinct.

However, combined efforts involving the National Trust for Scotland which created enclosures to prevent grazing and a shade tunnel at RBGE’s Edinburgh garden where cuttings have been propagated, have helped boost its fortunes.

Recently, Edinburgh-grown woolly willows were planted at Corrie Garbhlach where climbers used ropes to access the steep planting areas, and Corrie Sharroch, off Corrie Fee. As a result, more than 1000 willow plants have been translocated.

Another species, Scottish Alpine Sow Thistle, is being aided by genetic work carried out by the RBGE scientists.

A striking plant of around 1.5m high and with bright blue flowers, it is particularly at risk from grazing animals, leading it to retreat to small rocky ledges. Its numbers are now limited to four sites in the Cairngorms.

Dr Davey said: “We have done lots of genetic work trying to work out why it is not reproducing in wild.

“We have cross-planted in glasshouses and grown hundreds of thousands with more robust genetic diversity, so they have a better chance of surviving, reproducing and evolving and adapting to climate change.”

Around 800 specimens were planted earlier this year, with plans for more next year.

The 100 plants in the book span all sizes, from the tiniest to the majestic American chestnut (Castanea dentata), which once dominated the forests of the eastern USA but has fallen victim to an airborne fungus.

RBGE, a partner in Scotland’s Centre for Expertise in Plant Health, is involved in efforts to ensure the fungus does not take hold here.

The organisation is also helping to revive numbers of Atlantic or Atlas cedar (Cedrus atlantica), an impressive conifer native to Morocco and Algeria, and which is exploited for its timber and foliage for essential oils.

Since 1991, RBGE’s International Conifer Conservation Programme has distributed more than 250 trees across its gardens at Benmore and Dawyck, helping to safeguard its future.

Some plants have familiar names; rare species of begonia, rhododendron and magnolia feature in the book because of the high risk of them being lost in their natural habitat.

While climate change is a recurring theme. The cider gum (Eucalpytus gunni ), which grows in RBGE’s Edinburgh, Benmore and Dawyck gardens, is exclusive to Tasmania and prized by the indigenous Palawa people for its essential oils and timber.

Its fragile status has raised fears that it will need special attention if it is to survive in its natural range.

Some species, however, are born survivors.

“Chinese swamp cypress is a massive forest tree, discovered in a forest in southeast Asia in a valley where they wanted to flood for hydro-electric power.

“Despite finding this little crop of trees, it was still flooded.”

Seeds were gathered but failed to germinate, she adds. And although additional trees were found near the reservoir, they were destroyed to create paddy fields.

Expeditions by teams including scientists from RBGE located another stand high above the reservoir, some more than 900 years old. But they were illegally felled.

With just a few trees left, an international collaboration led to a small nursery being established. Since then, thousands of young trees have been planted back into the wild.

While the most impressive story of survival is that of the 40m tall Wollemi pine (Wollemia nobilis), of which just 80 mature trees remain in the wild.

At risk from disease, its entire population was almost lost during Australia’s 2019-2020 bush fires. A desperate effort by specialist firefighter teams saved the species, leaving its grove the only green area in a devastated landscape.

A stock of nursery plants and international sharing of material have boosted the wild population in one of what’s described as “the most successful examples of ex-situ conservation the world has ever seen”.

Dr Davey added: “It can be depressing to think of how close to being lost these plants are, but there is hope when you see how their fortunes have been turned round.

“It is so important to conserve species in the wild. If we can realise that some species are like the ‘giant pandas’ of the plant world – without them we will all be much poorer.”

World of Plants: Stories of Survival by Alexandra Davey is published by Royal Botanic Garden Edinburgh, £18.99