When civil war erupted in Syria, Ahmed Amri immediately thought about seeds.

Specifically, 141,000 packets of them sitting in cold storage 19 miles south of Aleppo. They included ancient varieties of wheat and durum dating back nearly to the dawn of agriculture in the Fertile Crescent, and one of the world’s largest collections of lentil, barley, and faba bean varieties—crops that feed millions of people worldwide every day. If these seeds were decimated, humanity could lose precious genetic resources developed over hundreds, or in some cases thousands, of years. And suddenly, with the outbreak of violence, their destruction seemed imminent.

Amri is the director of genetic resources at the International Center for Agricultural Research in Dry Areas (ICARDA), one of 11 international genebanks charged with conserving the world’s most vital crops and their wild relatives. Each center has a speciality—you’ll find the International Rice Research Institute in the Philippines, for example, while the International Potato Center is based in Peru—and this one focuses on preserving and protecting crops from arid regions, mostly in developing countries. The Center’s crown jewel is its genebank, where its samples are identified and stored for future use, either by the center’s scientific staff or plant breeders around the world.

Despite the high-tech sheen of the word genebank, the concept draws on basic agricultural principles people have used to improve their crops since the beginning of farming. Let’s say you’ve got two plants, one that grows well without much water, and another that produces a particularly large amount of the stuff you want to eat. Breed the two together and you’ve got a high yield, drought-tolerant version of your crop.

That’s the idea, anyway. In the long run, this conventional breeding process is wildly effective. It’s not only created every variety of the crops we grow and eat, but in many cases it’s created the crops themselves. Maize, for example, was created by ancient Mesoamericans by painstakingly breeding more and more appetizing teosinte, a stubby grass with tiny, tough kernels that has so little in common with modern maize that archaeologists dismissed it as a possible wild ancestor until genetic tests revealed the surprising truth. The problem in the short run is that conventional breeding can be s…l…o…w. Teosinte was domesticated in central Mexico between 6,000 and 10,000 years ago, but farmers only managed to create a variety that tasted good a mere millennium ago.

The genebank at the International Center for Agricultural Research in Dry Areas. ICARDA

Genebanks aim to preserve crop varieties that already have been created, as well as speed up the process of making new ones. Between the 11 international crop genebanks, more than 700,000 varieties of the world’s 17 most important crops are preserved. Why so many? You never know when an old crop—or more likely, the genes it contains—might come in handy. A type of maize that no one plants anymore could be the one that contains exactly the genes the crop needs to become, say, more drought tolerant. Preserving those seeds preserves those genes.

The banks routinely make their collections available to farmers and breeders the world over so those genes can be bred into modern varieties as needed. And they also have their own scientific teams working to identify the primary traits of the seeds they’ve collected and create new varieties of crops that may come in handy. For example, genes from fast-growing varieties of maize are helping breeders create corn crops that can cope with a shorter rainy season in Mexico, an effect of climate change.

Destroy a seedbank, though, and those helpful genes can be wiped out before anyone can discover them, much less put them to use. That’s why Amri was so worried about the fate of the seeds at his agricultural research center. Although crop varieties and their wild relatives are at risk of disappearing every day as farmers switch to monocultures or abandon fields all together, no international genebank had ever faced so immediate a risk from war.

At the beginning of Syria’s civil war, the fighting was concentrated in the south, far from the Center’s headquarters in the north. But Amri knew it wouldn’t take guns or bombs to destroy the genebank. All it would take was a power outrage that knocked out the facility’s air conditioning. The seeds, preserved in cold rooms for decades, would warm quickly and become unusable. The bank had backup generators, but how long would they last? What if it became impossible to buy fuel? What if the generators were stolen, or commandeered by soldiers?

Collecting seeds for the genebank. ICARDA

Luckily, the Center had been preparing for its own destruction since day one. It already had sent emergency backups of about 87 percent of its collection to genebanks in other countries. Even under the best political conditions, “you worry about fire, you worry about earthquakes,” the Center’s director general Mahmoud Solh says in this video interview. Creating emergency backups is standard practice for international genebanks, from Mexico to Nigeria.

But that left 13 percent of the Syrian collection—more than 20,000 samples—that hadn’t been backed up. As soon as the fighting started in the spring of 2011, the genebank’s staff switched gears from collecting and distributing seed samples to devising a rescue plan. People there became very familiar with northern Syria’s back roads as they drove the seeds out of the country.

Importing seeds and other agricultural materials can be difficult—just think of that half-eaten apple you had to throw away during your last trip through customs. The Center’s employees milked every connection they had to get the job done. When they evacuated half of the vulnerable samples to Turkey, the Turkish agricultural minister drove to the border to escort the seeds into his country, Solh remembers. (The other half went to Lebanon, with much less fuss.) Today, “99.9 percent of the holdings are all outside Syria,” Amri says.

A year and half after the war began, the fighting drew close enough to Aleppo that the Center’s international staff was advised to leave Syria. That left about 50 Syrian staff members responsible for completing the second round of the evacuation: shipping as many samples as possible to the Svalbard Seed Vault in Norway. That’s the “backup to the backup,” the genebank designed to outlast all other genebanks from its location in the Arctic Circle and come to the rescue in case of worldwide, catastrophic crop destruction, explains Luis Salazar, communications manager for the Crop Trust, which oversees the Svalbard collection.

Even as the area around the genebank fell under the control of two competing armed groups and the remaining staff reckoned with several kidnappings, they managed to backup 80 percent of the center’s collection in Svalbard. The last shipment arrived at Svalbard in March 2014—nearly two years after Amri and much of the rest of the international staff had relocated to Rabat, Morocco. Last month, the Center won the Gregor Mendel Innovation Prize—coveted among plant breeders—for its rescue and preservation of the genebank. And amazingly, the Aleppo site continues to be operational. The Syrian staff has managed to keep the electricity on and the genebank intact through four years of war.

Now comes the hard part: planting the seeds the team sent away and regenerating those crops far from home. Usually, genebanks store about a pound of each kind of seed they collect, but the “safety duplicated” samples stored at other genebanks are only about half an ounce, says Thomas Payne, the head of the genebank at the International Maize and Wheat Improvement Center outside of Mexico City, which stores many of ICARDA’s emergency backups.

Half an ounce isn’t enough to share with farmers, one of a genebank’s central missions. “What is the value of having all that material secured but not accessible?” Payne says. The Center has granted Payne and his team permission to open their duplicated wheat samples and start planting them at the Mexican center, both to help bulk up the collection and make sure the samples are still viable. After all, “just because something’s in the refrigerator, it doesn’t mean it’s alive,” Salazar points out.

“What happened in Syria was a good eye-opener” for international genebanks, Solh says. Despite the emergency backups, the Center was too centralized in Syria. Now, it’s running major initiatives in Morocco, India, and Ethiopia. Those centers will continue to operate as part of the new, decentralized center, even if international staff can eventually return to Aleppo, Solh says. Genebanks are not isolated treasure troves and shouldn’t be treated as such. Their power comes from the connections between them, and the worldwide network of genetic resources those connections create.