Climate change demands a food revolution. Faced with heat, drought, pests and diseases, the crops we eat every day could become relics in a generation or less, at least where they are currently grown. From beef and fish to chocolate and wine, one beloved food after another is joining the at-risk list.

Entrepreneurs and industry are banking on innovation as a way out of the problem. Ideas such as alt-meat and artificially intelligent farming systems have been hailed as the answer to our biggest agricultural challenges.

But we don’t need to invent a new mousetrap or reverse engineer our favorite foods and drinks to keep them around. Instead we can turn to an already existing natural solution: crop diversity.

Take coffee. Right now, the two species that dominate the industry, Coffea arabica and C. canephora (source of the commercial variant robusta) are under urgent threat worldwide—as are the 125 million people who depend on coffee crops for their income. Arabica coffee is especially vulnerable to spiking heat, unreliable rainfall, and the new pests and diseases that thrive in these conditions.

Over the past several decades, production in South and Central America has been hit by outbreaks of coffee leaf rust, a destructive fungus that turns coffee plants’ vibrant green leaves brown—and then spreads quickly. The berry borer, a small insect that burrows its way inside beans, threatens farmers in Ethiopia, Kenya and beyond.

Coffee farmers need better varieties that will withstand the pests and the erratic weather. Where can such traits be found? They may exist today in the wild and on small traditional farms. In far-flung fields and hidden deep in forests are arabica and robusta types—and altogether new coffee species—that could save our future lattes.

If researchers work quickly to study these plants in the lab and in fields, we can identify the ones tough enough to survive. Breeders can then develop new varieties to climate-proof the brew we know and love.

Scientists and farmers have already started the search. World Coffee Research, a nonprofit funded by Lavazza, Gruppo Illy and other coffee companies, is currently testing the climate resilience of more than 30 top-performing coffee varieties in fields around the world, in the hope that the traits we need are to be found among them.

Experiments such as these, however, rely on the careful collection, conservation and study of coffee plants. Specialist coffee gene banks, such as the International Coffee Collection at the Tropical Agricultural Research and Higher Education Center (CATIE), headquartered in Costa Rica, safeguard traditional varieties and wild species. National gene banks, such as those in Madagascar, Kenya, Colombia and Costa Rica, store diverse plants that, in many cases, have yet to be exploited.

Farmers are also an important piece of the puzzle. In addition to growing new varieties in their fields and assessing the results, they can protect forests where unknown wild strains of coffee might still be found.

A recent study showed that 60 percent of wild coffee species are at risk of extinction in their natural habitat, mostly because of global threats to forests. Even arabica’s birthplace, the mountainous rain forests of southwestern Ethiopia, is in jeopardy. The region has lost 60 percent of its forest cover in the past three decades, mostly from conversion to farmland—the leading cause of forest loss worldwide.

Forest loss must stop. But until it does—and in case it doesn’t—we need to ramp up efforts to find wild coffee species and give them safe harbor in gene banks.

And we need to keep these repositories in the best possible working order so the genetic materials they guard are easily accessible by researchers and farmers worldwide. This will take increased funding and more, better-trained staff.

My organization, the Crop Trust, has calculated that shoring up coffee gene banks would call for a onetime cost of $25 million, less than half of the daily revenue of Starbucks. The return on this investment—crops that resist climate impacts—is orders of magnitude higher for the $100-billion coffee industry.

We can no longer take what we eat—and drink—for granted. As the climate crisis bears down, we will probably have to do with less of certain foods. But if we embrace coffee’s diversity and speed up the work already underway by breeders and farmers, the morning cappuccino won’t be one of them.