A fungus ruthlessly attacking coffee crops across Latin America – it's enough to make any coffee lover queasy. But no one is as concerned as coffee farmers and coffee shops.

Coffee rust, or roya, is the culprit behind the fungus. The rust has long been an issue for coffee farmers, but one that could be controlled due to predictable climate patterns. However, the outbreak in the last two years is the worst in Latin America's history, causing more than $1 billion in economic damage across Latin America and the Caribbean.

And it's getting worse. The U.S. Agency for International Development (USAID) predicts that global production will fall by as much as 15 to 40 percent in the coming years.

With the steep decline in production, every coffee shop in the United States that imports beans is affected in some way. 

"In 2012, a rust epidemic hit Central America, due in part to prolonged rains during the 'dry' months," says Alfredo Pacas, who produces coffee in El Salvador for Brooklyn-based Gorilla Coffee and other coffee roasters around the globe. "We are still perceiving the effects of this epidemic. In some farms, production has fallen between 40 and 50 percent. Other farms were left unrecoverable, forcing us to replant the entire farm."

Related: This New Coffee Lid Is All About the Aroma

With roya on the rise, Gorilla Coffee pays a premium to source its beans from farms with fastidious managers whose attention to detail helps control the spread of the fungus, says Gorilla co-owner Darleen Scherer.

Specialty coffee chain Joe, which has 10 locations in New York City and Philadelphia, has dealt with similar struggles. The chain was forced to raise prices 25 cents a drink due to the rising cost of coffee beans, according to head roaster Ed Kaufmann.

"We've had a few negative comments, but people understand," says Kaufmann. "They don't come to our shop because it's the cheapest cup of coffee on the block. They want higher-quality coffee."

Unfortunately for Kaufmann and Scherer, high-end coffee shops are more likely to be affected than shops that buy the cheapest beans possible. That's because even if the fungus doesn't kill a coffee plant, it could destroy the quality of its beans. And for high-quality coffee shops, a flavorless cup of coffee is a business killer.  

"I've seen some farms absolutely destroyed and some completely lose their credibility as providers," says Kaufmann, who says that he has had to look in new regions after turning away a handful of coffees that aren't up to Joe's standards.

Mega-chains such as Starbucks, which Kaufmann considers to be a higher-quality chain, have been able to avoid price increases due to buying from a varied wealth of suppliers, advanced purchasing deals and a more long-term approach to buying coffee.

Related: What Coke Is Brewing by Increasing Its Stake in Keurig

Starbucks has also been playing the long game in preventing coffee rust from affecting its producers. As climate change has created warmer climates that allows roya to thrive, Starbucks has increased its farmer support and research. Programs include Farmer Support Centers, a Global Agronomy Center for biological research and open-sourced work with the World Coffee Research Institute to evaluate coffee varieties which have the potential to be rust resistant.

"We've put systems in place that support our supply chain, and the coffee industry as a whole," according to a Starbucks spokesperson.

The coffee industry gained a more unlikely ally this Monday when the USAID announced it would invest $14 million to fight coffee rust, including a $5 million partnership with Texas A&M University's World Coffee Research. USAID's chief concern is the food security and economic wellbeing of small farmers. The government agency will support research on rust-resistant varieties and disease-resistant seedlings, as well as expand institutions' abilities to monitor and respond to roya.

However, as research continues, coffee shops and farmers are forced to find more immediate solutions.

"The good thing is, now we're in crisis mode," says Kaufmann, who says that the direness of the situation is forcing farmers and coffee shops to come up with innovative solutions fast.

Roya can be controlled, but not eliminated, meaning more farms are taking careful precautionary measures. Fungicide, shade management, high-quality fertilizer and healthier seedlings are all increasingly common. New, disease-resistant hybrids are being grown over a multi-year process. While these changes take time and increase costs, there's a glimmer of hope that, eventually, they may not only yield crops less susceptible to coffee rust, but also produce a higher quality cup of coffee.

The coffee rust has ruined the livelihoods of tens of thousands of individuals across the coffee industry, and will likely affect thousands more as the rust spreads. But, as the entire chain of coffee production pushes forward, there's still hope on the horizon for a cup of coffee that's stronger in every way. 

Related: Will Blue Bottle Coffee Take On Starbucks, Or Become It?