A California judge has ruled that coffee sellers must post a warning stating that a chemical in the popular drink could increase the risk of cancer, despite studies showing that coffee has health benefits that may outweigh the small risk.

The concern is not caffeine, but rather acrylamide, a chemical produced during the coffee roasting process. Acrylamide is used in industrial production, is a component of tobacco smoke and is present in foods including potato chips, bread, cookies, canned olives, prune juice and coffee, according to the National Cancer Institute.

Los Angeles County Superior Court Judge Elihu Berle ruled in favor of the Council for Education and Research on Toxics, a nonprofit that sued Starbucks and dozens of other coffee manufacturers and sellers in 2010. The defendants argued that the trace amounts of acrylamide in coffee are harmless and outweighed by the health benefits of the drink. The plaintiffs countered that technology exists to reduce acrylamide in coffee without affecting its flavor.

California’s Safe Drinking Water and Toxic Enforcement Act of 1986 (passed as ballot initiative Proposition 65) requires warning signs anywhere carcinogens, or cancer-causing chemicals, might be present, including restaurants, parking garages and retail stores. Acrylamide is one of the hundreds of items on the state’s list of substances that can cause cancer or birth defects.

Berle said that while the plaintiff had offered evidence of coffee’s risk of harm, the defendants failed to satisfy their burden of proving that acrylamide does not pose a significant risk—defined as one additional case of cancer per 100,000 people exposed—or that coffee consumption confers any health benefits.

Opponents of the ruling note that studies over the years have not conclusively shown that coffee is harmful, and in fact have demonstrated that it has health benefits. The World Health Organization’s International Agency for Research on Cancer has concluded that coffee is not associated with an increased risk of cancer.

A recent review published in the European Journal of Cancer Prevention, which looked at the available evidence on coffee and the risk of all cancers, concluded, “Coffee consumption is not associated with overall cancer risk.” A meta-analysis that pooled data from multiple prior studies found that the relative risk for all cancers of an additional daily cup of coffee was 1.00, meaning no increase or decrease in risk.

The clearest evidence of the benefits of coffee relates to liver health, including reduced risk of liver cirrhosis and liver cancer. Various studies have seen a decrease in the risk of endometrial cancer, oral cancer, advanced prostate cancer and possibly colorectal cancer, though data are limited. For most types of cancer, coffee consumption appears to make no difference one way or the other. The only potential evidence of increased risk relates to bladder cancer and childhood leukemia in children of mothers who drink coffee during pregnancy, but the data are again limited and inconsistent.

The National Coffee Association, which includes Starbucks and Dunkin’ Donuts, said that it was “currently considering all of its option,” including legal appeals. Businesses that fail to post warning signs could face retroactive fines of up to $2,500 per exposed person per day, The Guardian reports.

“This lawsuit has made a mockery of Prop 65, has confused consumers, and does nothing to improve public health,” NCA president and CEO William Murray said in a statement.

Indeed, some critics contend that the Proposition 65 warnings have become so ubiquitous that most people simply ignore them, and it seems unlikely that the warnings will deter many of those who enjoy their cup of java.