Around the world, botanists are battling to find rare wild seed strains before they die out – helping ensure food supplies that can survive the perils of climate change.

Trapped by Hitler’s soldiers during the brutal winter of 1941-42, a band of Russian botanists faced a terrible choice.

For more than a decade, workers at the Vavilov Institute of Plant Industry had been gathering seeds from all over the world and carefully preserving them in a locked vault. They believed they held the raw materials to allow scientists to breed the super plants of the future, crops that could survive anything nature could throw at them.

The Institute’s founder, Nikolai Vavilov, had spent years collecting rare and wild relatives of wheat, rye and other staples so crop breeders could mine their hardy genes. Now the Nazis had laid siege to Leningrad (now St Petersburg), preventing the institute’s workers from leaving the city. So the botanists barricaded themselves in with the stash, preparing to defend it from rats, freezing weather and desperately hungry citizens. 

Lesser scientists would have eaten the precious packs of rice, wheat, peas, oats and potatoes during the 28-month siege. Instead, Dmitri S Ivanov, the head of the rice collection, a bespectacled man with fine, side-parted hair, painstakingly conserved several thousand packs of rice while gradually succumbing to malnutrition.

Eight of his colleagues also died of cold and hunger while protecting their specimens, some of which they managed to smuggle to safety in the mountains. Many precious plant varieties survived, going on to breed crops that would later feed millions of people.

Today, the botanists’ mission lives on in a vast international network of genetic safe houses. Seed collectors are criss-crossing the globe in vans and airplanes, racing to collect as many ancient strains as possible and store them before they go extinct. This time, however, they are looking for plants that can survive climate change. And even today, the safe houses are not as secure as they might be.

Seed hunters are particularly interested in finding strains that live in arid, harsh, or deluged places

Recently two New Zealand seed hunters drove matching white vans along treacherous roads in the remote reaches of Russia’s Altai mountains, near the Mongolian border. Working with staff from the Vavilov Institute, the New Zealanders sought and plucked ancient variants of grasses – long-lost relatives of crops that farmers today use to feed millions of people and farm animals. Working their way around a map of known hotspots of biodiversity, they would first find a promising specimen, then identify it using a reference volume, then carefully pluck a handful of seeds and slide them into an envelope. 

After sharing varieties with their friends from St Petersburg, the New Zealanders flew with their precious cargo back to the Margot Forde germplasm centre in Palmerston North, a city two hours’ drive from Wellington. There, they breed their haul inside a secure, mesh-ringed garden until they have at least 100 seeds of each species, enough to maintain healthy genetic diversity.

The whole operation is simultaneously expert and humble to observe. When a crop needs to be pollinated by insects, a technician is assigned to catch a wild bumblebee. The technician painstakingly washes the presumably bemused bee with a damp cotton buds to remove all traces of outside pollen, before releasing the bee inside the mesh.

Later the collectors brush, dry and store their seeds in a secure, low-humidity chiller. From there, they will send a sample to any researcher who wants to study it, or to any gene bank in the world. If a variety later goes extinct in its homeland, the hunters will return a selection of seeds.

Seed hunters are particularly interested in finding strains that live in arid, harsh, or deluged places, because they may be able to share genes that help crops weather the climate of the future. The explorers visit parts of China, Morocco, Tunisia, Kazakhstan – anywhere they can gain permission to visit that harbours biodiversity.

Much of what they find would be a crushing disappointment to a starving botanist, should they crumble and decide to eat any of it. Some of the most-coveted varieties are inedible, the bitter wild relatives of important staples such as wheat and maize. These wild cousins remain closely enough related to allow them to interbreed with more delicious toast and taco-producing variants.

The food we eat is the pampered offspring of many successive generations of plants, each of which was plied with plentiful water, nutrients and pest-control

Many of our domesticated crops have grown spoiled over the years, says Kioumars Ghamkhar, an Iranian-born plant geneticist who heads the Margot Forde gene bank. Over the centuries, farmers have selected crops that were very productive, sweet-to-taste, or easy-to-peel, sacrificing other traits in the process.

The food we eat is the pampered offspring of many successive generations of plants, each of which was plied with plentiful water, nutrients and pest-control, he says. “It is like they are living in a five-star hotel,” says Ghamkar. Seed scouts reach back into prehistory to recover the lost “tough” genes.

“We go and collect in the footsteps of evolution,” says Ghamkar. “In the mountains of Azerbaijan there is no five-star hotel, so the plants are living in a hostile environment. When you cross-breed them, you bring back the resistance and persistence genes, and that is what you need when the climate starts to change.” 

People’s diets around the world are growing increasingly similar, and people are getting more of their calories from the same few crops: maize, wheat, rice, potato and, increasingly, soy bean. At the same time, climate change is threatening to make it harder to grow crops in many places. Vavilov was painfully aware that crops that are too frail or genetically similar are vulnerable to being wiped out by a single disaster, like the drought that caused the Russian famine of the 1920s or the potato blight that created the 1840s Irish famine.

Now scientists and governments all over the world agree that people need a vast and deep array of plant genes to protect themselves from hunger. Recently an Israeli wild wheat turned out to be very high in protein, while a South American potato yielded a gene that seems to help potatoes resist blight. Other wild strains have extra-deep roots or thrive on much less water.

People cannot always save the plant varieties they love, even when they have tended them for centuries

There are many ways an edible plant can go extinct in the wild, but only a few ways to preserve it. The best is leaving it outdoors, where nature intended, says Chikelu Mba, leader of the Food and Agriculture Organisation’s seeds and plant genetics team. There, a plant can continue tweaking its genome to cope with changing conditions. But seed collectors say climate change and urban development is erasing the habitats of some wild varieties, sometimes before rescuers can get there. 

People cannot always save the plant varieties they love, even when they have tended them for centuries. In the highlands of Papua New Guinea every valley has its own unique yam species, says Mike Bourke, a specialist in Pacific agriculture at the Australian National University. Home gardeners grow rare varieties out of loyalty to their ancestors, even if they are chewy or hard to peel, he says.

But every time there is a drought or a natural disaster, faster-growing easier-to-rear commercial crops gradually supplant the diverse range of old varieties. “Things are better because you have more productive varieties, but if things go wrong they can go wrong in a very spectacular way,” says Bourke. 

Commercial farmers find homogenous crops easier to grow too, says Mba. When they plant diverse or heirloom varieties, “it complicates the system. All the plants are not going to mature at the same time, mechanisation is more difficult, they require different amounts of fertiliser, and yields may be low.” There may come a time when some important varieties linger only in gene banks. But, even there, survival is not guaranteed.

Quite what the World War Two-era botanists would make of today’s modern gene banks is anyone’s guess. The best-funded of the 1700 collections globally cryopreserve important varieties in liquid nitrogen, while the worst-provisioned cannot even afford to run the air-conditioning, says Mba.

Gene banks co-operate to swap varieties across international borders, and smaller centres often send duplicates for storage at better-funded institutions. The ultimate back-up collection is at Svalbard in the Arctic Circle, in a fortress built in permafrost on a remote island off Norway. The futuristic-looking seed vault is designed to weather any apocalypse, including nuclear winter, and allow survivors to re-build agriculture.

If I think back to my own homeland, Nigeria, there are certain things we eat, like African yam bean, that no international centre is working on – Chikelu Mba

But although Svalbard carries many duplicates, it does not hold everything. Nor do the 11 international gene banks, which are funded by a consortium of governments, wealthy companies and charities. 

Unlike Svalbard, which functions as a locked safe, the 11 centres are charged with actively taking out and studying the various varieties in their coffers. Each has their own particular speciality, such as beans and cassava, rices, or sweet potato. The centres can only study whichever crop varieties they are funded for, which leaves the responsibility for saving many unique species with hundreds of smaller national centres, say Mba.

“If I think back to my own homeland, Nigeria, there are certain things we eat, like African yam bean, that no international centre is working on,” he says. “So if it is not properly conserved in Nigeria, it will be lost.”

Many smaller centres are poorly staffed and poorly funded. “Some of the samples coming out of them are going to be horrible, and many won’t be viable,” says Mba. 

War still threatens the gene libraries and their guardians. Fighting has destroyed two irreplaceable collections, in the Democratic Republic of Congo and Somalia, says Mba. “They basically lost everything they had. Some of the varieties were never backed up anywhere.” 

Another important international centre in Syria had to be abandoned suddenly during the war in Aleppo. The collection’s caretakers had stored duplicates in Svalbard, whose minders allowed them to make the first-ever withdrawal from the doomsday vault. 

Like his fellow botanists, Vavilov starved to death, though not in the siege of Leningrad. He died in a gulag in 1943, accused of harming Soviet agriculture with his views on plant genetics. Five decades later, his botanists’ ordeal was finally revealed in the West by two institute staff members writing in the journal Diversity.

Vavilov himself is now seen as a visionary. Nobody knows which obscure variety of wild wheat or sweet potato might turn out to contain a crucial gene that will help farmers feed us all as the climate alters. The seed hunters are trying to ensure that, whatever it is, it isn’t lost before we can recognise it. 

Join 700,000+ Future fans by liking us on Facebook, or follow us on Twitter, Google+, LinkedIn and Instagram

If you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.