In 1862, the grapes of France’s wine and brandy industry began to disappear—starting in the lower Rhone Valley one by one, vines withered up and died. Over the next two decades the blight spread across the nation and the continent, setting back brandy and wine production by a generation.

Two culprits were identified in the die-off. The first was an aphid from the New World, called Phylloxera vastatrix, which attacked the vine roots. The second? It was quieter and arguably more insidious: the nation’s reliance on monoculture. While selecting vines for hardiness and good yields made short-term sense, over decades a dependence on nearly genetically identical rootstock proved disastrous.

Could the Weber blue agave plant that fuels the modern tequila industry be facing the same sort of threat? That’s of great concern—even if it’s not one widely spoken of—among industry veterans. In response, some producers are looking at ways to avoid potential disaster by pushing for a change in the agave stock.

“We’d noticed in the past few decades that the agave was becoming more susceptible to the attack of plagues and diseases because it’s losing its natural resistance,” says Carlos Camarena, the fourth generation to distill tequila at La Alteña in Arandas, Mexico. “So, we wanted to introduce a little bit of genetic diversity in the blue agave plant—to ensure natural resistance.”

To understand how a nation’s crop became susceptible to collapse, you need to know two things: That all tequila by law must be made from Weber blue agave—a plant that grows relatively quickly and produces tequila with a consistently distinctive taste. And you also need to know how agave reproduces.

The agave plant can actually reproduce in one of two ways—asexually, by sending out shoots, which are essentially genetic clones of the mother plant. (The Weber blue agave is a prolific cloner.) Or by letting the plant reach sexual maturity, when it sends up a towering asparagus-like stalk called aquiote, which blooms at night. That’s when the lesser long-nose bat and certain moths alight, picking up pollen, which they convey to other plants, allowing for sexual reproduction.

The shoots are essentially photocopies of the mother plant’s genome. The pollination method results in a more diverse genetic base—making the crop potentially more resistant to the ravages of disease.

The problem arises because agave growers never want to see that stalk. The agave essentially produces and saves up sugars over six or eight years, then it goes on a massive sugar binge, consuming most of its own sugar to produce the stalk. Since sugar is essential for making ethanol, once an agave sprouts it becomes useless for making tequila. In short, agave growers hate sex.

So virtually all growers rely on asexual reproduction to propagate their plants—and this practice has been going on for generations, meaning that most blue agave today descends from just a handful of mother plants. If a disease or insect appears and decimates one plant, it has the potential to decimate the entire crop.

A hint of what could come was seen in the late 1990s, when a combination of fungus and bacteria invaded the agave, causing about a quarter of the region’s crop to die.

Camarena is trying to figure out a solution at La Alteña, which makes several tequilas, including El Tesoro, Tapatio and Ocho. (I visited last fall as a guest of El Tesoro.) The project began three years ago, as part of an effort led by the Tequila Interchange Project. Scientists noted that the species of bat responsible for most of the pollination was dwindling—it was even listed for a time as an endangered species. Researchers suspected its decline was driven by the shortage of flowering agaves. So, one motivation behind the project was to provide bats with food by letting agaves flower.

“But we wanted them to do something in exchange,” Camarena admitted. And that was to pollinate the agave, to create cross-pollinated seeds with genetic diversity and natural resistance.

La Alteña has about 2,000 acres on which it grows agave. It began by letting about two percent of its plants go to seed, attracting pollinators. Last year, Camarena built a greenhouse near the distillery where his team could nurture the collected seeds.

The greenhouse now has about 6,000 plants, with enough space to accommodate about 200,000 seedlings eventually. La Alteña has so far invested about $80,000 in the project, including construction and staffing, and Camarena sees this as an ongoing investment in tequila’s future.

Early genetic tests of the seedlings at the National Autonomous University of Mexico Herbarium suggest that the program is achieving its goals. “We have detected genetic diversity,” Camarena says. “How much of that genetic diversity will translate into natural resistance, we don’t yet know. But we are pretty positive about that.”

More agave growers will need to follow suit to make a substantial impact, and broadening the pool has met some obstacles in recent months. Since blue agave needs to be planted a half-dozen years or more before it’s turned into tequila, supply and demand is a matter of guesswork. This leads to regular cycles of surpluses and shortages.

And Mexico is now facing a stark shortfall of agave for tequila, meaning every plant is needed to keep up with the demands of production. Even La Alteña shelved plans to let agave go to seed this year, but aims to resume doing so in 2020.

“Almost nobody wants to be part of [the program], because every plant allowed to reproduce sexually, of course, can’t be used for tequila production,” Camarena says. “Every single plant now has a very high value, everybody is trying to collect those plants and use them for tequila production.”

He anticipates that when the shortage becomes surplus, as recent history suggests will invariably happen, the pool of participating growers will expand. “We are hoping that once agave availability becomes better in the future years, more and more will be part of this program,” Camarena says.

The future of tequila may depend on it.

Camarena says a worst-case scenario is that growers continue to rely on genetic clones, leaving the crop susceptible to a Phylloxera -like blight. “That could be next year, or in a thousand years,” he says. “A virus or a bacteria or a fungus could come and attack the blue agave plants, and because of all the blue agave plants having the same genetics, it could wipe out all of the blue agave and there would be no tequila.”

“But we are very optimistic,” Camarena adds. “We will have plenty of tequila to drink and share with our friends in the future.”