For nearly six years, a fungus that's commonly known as rust has killed so many coffee trees in Central America that scientists have speculated the region could lose up to 40 percent of its coffee crop.

Now, as researchers scurry to maintain the global coffee supply, there are signs that climate change and wild weather could make the problem even worse.

"We just keep getting report after report at our partner institutions in those countries—these are growers, buyers, importers, and roasters," says Tim Schilling, director of World Coffee Research at Texas A&M University, describing the problem in places like Panama and El Salvador.

Known as roya in Spanish, the rust fungus has also engulfed parts of Guatemala, Nicaragua, Mexico, Costa Rica, and Honduras.

The ultimate culprit: a phenomenon that scientists call climate variation, which sees weather patterns changing dramatically from year to year. More rain in recent years has meant more rust, which blankets the leaves of coffee trees, cuts off sunlight, and restricts photosynthesis until a coffee tree keels over and dies. (Related: "Coffee: Beyond the Buzz.")

View Images The majority of South and Central America’s coffee is grown by small-scale farmers. Rust has created widespread concern about the future of coffee prices and the economic impact of thousands of farmers becoming unemployed. PHOTOGRAPH BY JANET JARMAN

Last year, a United Nations panel of climate scientists found that downpours related to El Niño and La Niña weather events—periodic changes in the Pacific Ocean's temperature that influence rainfall near the Equator—will intensify this century, leading to even more precipitation.

The problem has attracted attention from Central American governments, which see depressed coffee futures as a threat to their economies. Some coffee producers, meanwhile, have accepted help from development organizations, which fear that too many unemployed farmers could lead to widespread poverty and fuel other problems, like the drug trade.

The United States—which consumes more coffee than any other country but produces close to zero—recently announced a five-million-dollar grant to Texas A&M's coffee research program to help combat rust.

View Images Guatemalan coffee grower Luis Manuel Antonio (far left) has seen coffee rust ravage his small farm. The diminishing yields have caused stress and anxiety for him and his wife. Other areas have seen rises in child malnutrition as a result of declining income. PHOTOGRAPH BY JANET JARMAN

Coffee Climate

Because coffee is so weather dependent, it's an especially volatile crop. Too much water fuels a debilitating fungus. Too little sucks the tree dry.

Add in the variations of harsher winters, more rainfall in some areas, and none at all in others, and the world's third most popular drink (behind water and tea) is becoming much harder to produce.

"We used to think that seasons were not that important; now we see that they're incredibly important," says Alvaro Gaitan, head of plant pathology at Colombia's National Coffee Research Center.

The problem of rust is not new in Central America. The fungus has appeared in multiple waves since the 1970s but mutates each time, complicating researchers' efforts to combat it.

When rust struck Colombia in 2008, it spread from farm to farm, cutting the country's coffee output from 12 million bags to 7 million in a single year. The country's economy sputtered. Some farmers—many with less than a single hectare of land—had no crop at all.

Earlier this year, Brazil faced the opposite problem of Central America's: an unprecedented drought caused farmers to lose nearly one-fifth of the country's usual 55 million bags of coffee.

Coffee prices rose worldwide from $1.20 per pound to nearly $2.20. Most large coffee chains, including Starbucks, absorbed the higher cost rather than pass it on to customers.

But rain arrived in March, and Brazil's coffee industry is expected to bounce back, with around 50 million bags anticipated next year. Even that may not be large enough to keep prices stable.

View Images Nicaraguan coffee pickers, who generally travel from farm to farm during the harvest season, have seen their work dry up as rust affects more plants. By some estimates, the fungus has led to drops of as much as 40 percent of annual yields in parts of Central America. PHOTOGRAPH BY JANET JARMAN

Genetically Modified Coffee?

Combating rust has proven more elusive than Brazilian rain.

The fungus continues to mutate, appearing in Guatemala and Nicaragua in different strains than the one detected in Colombia. Most farmers douse plants in expensive fungicides, but there's little research on whether chemical treatments work on new strains of rust.

"We don't have the products or the tools to fight this disease," Carlos Torrebiarte, a Guatemalan coffee farmer, told an interviewer in 2012. His yield was expected to fall by 30 percent.

The solution, agriculture experts say, is to engineer new plants designed to withstand the attack of the fungus.

"The main strategy is to use genetics," says coffee researcher Schilling, who is overseeing some of the science funded by the multimillion dollar grant, to be administered by the U.S. Agency for International Development.

View Images In light of the rust epidemic, coffee farmers in western Guatemala keep track of every bean they produce to make sure that none are lost in the process of harvesting, drying, and bagging the coffee. PHOTOGRAPH BY JANET JARMAN

Schilling's team is working to create rust-resistant seeds with hopes of replacing as many plants as possible in Central America that are susceptible to the fungus.

The biggest question may be whether farmers can be persuaded to let foreign scientists with genetically modified seeds swoop in to replant coffee fields.

Governments will likely need to subsidize the seeds. And nonprofits will have to ensure that those seeds are planted correctly. Many experts wonder if the process, unfolding over many seasons—some years without any yield at all—will drive farmers to try to find other work.

Luis Fernando Samper, a coffee marketer with the National Federation of Coffee Growers in Colombia, is confident that rust can be defeated over the next decade by replacing sick trees. For a fickle crop in a fickle climate, however, the challenges are likely to keep coming.

Follow Dan Stone on Twitter.