The future of gin is safe, according to horticultural experts who have collected juniper seeds from across the country to help conserve the declining tree species.

Juniper berries, which take two years to mature slowly on the plant, help give the popular alcoholic drink its distinctive flavour, but the native UK species is in decline.

The UK National Tree Seed Project has been set up by the Royal Botanic Gardens, Kew, to collect seeds from juniper and other UK tree species and store them in the Millennium Seed Bank to ensure they do not vanish from the countryside.

The project has “banked” 5.8 million seeds from 6,500 UK trees since May 2013, with the aim of collecting seeds from all native woody plants, and juniper is the first species to be fully collected and saved.

Some 50 collections of seeds have been made from juniper trees and shrubs across Britain, including from Wiltshire, Oxfordshire, Cumbria, Conwy and the Scottish Highlands.

They are taken to the Millennium Seed Bank at Wakehurst, Sussex, where they are put through a rigorous process including being cleaned, dried and examined to make sure they are viable, before being stored in underground vaults at minus 20C.

Royal Botanic Gardens staff collect juniper seeds at RSPB Abernethy Reserve, Scotland (PA)

Juniper, which is important not just for gin but supporting a range of wildlife, is facing a number of problems including fragmented populations and difficulties regenerating successfully, as old trees and shrubs produce fewer seeds and young plants are eaten by deer and rabbits.

Plants are also being hit by a fungus-like disease, Phytophthora austrocedri, which causes foliage to die back and eventual plant death, and was first discovered in juniper in Britain in 2011.

Preserving juniper seeds will help with conservation work and research, without which experts have warned it might be “last orders” for the aromatic plant.

Dr Shelagh McCartan from Forest Research, which is involved in the UK National Tree Seed Project, said: “Collecting viable seeds from juniper is not always easy and the berries we harvested from 43 different populations throughout Britain will not only play an important part in this conservation work but help us understand the challenges facing this tree species.”

The project, which has been given funding from the People's Postcode Lottery, is also close to having completed the collection of seeds from ash trees, which are threatened by the disease ash dieback, which is now found in 40 per cent of the UK.

In 2016, the project saw seeds from 30 different species banked in the Millennium Seed Bank, having been collected from 3,000 trees at sites including in Devon, Cambridgeshire, Shropshire, Northern Ireland, Wales and Scotland.

Richard Deverell, director of Royal Botanic Gardens, Kew, said: “2016 has been a fantastic year for the UK National Tree Seed Project and I'm delighted to hear that we've fully collected and conserved our native juniper species.

“This project is a huge undertaking, but once complete it will provide a fundamental collection of our iconic British trees, helping Kew to lead the way in tackling the many threats facing the UK's stunning woodlands.”