Coffee causes cancer. That is the warning coffee shops in California will have to post in highly visible places, after a David v. Goliath court battle in the state ended with a win for the little guy.

A small nonprofit organization, The Council for Education and Research on Toxics, went up against the powerful coffee industry, led by Starbucks Corp., over a chemical called acrylamide, which is produced during the bean roasting process. Acrylamide is a known carcinogen. Despite this, studies have shown that coffee actually lowers the risk of liver and uterine cancers and is not associated with a higher risk for breast, prostate or pancreatic cancer.

Coffee was removed from the World Health Organization’s "possible carcinogen" list in 2016.

Nonetheless, the coffee industry – which says removing acrylamide would harm the flavor of coffee – failed to make the case to a Los Angeles Superior Court judge that the substance does not pose a serious health risk.

"While plaintiff offered evidence that consumption of coffee increases the risk of harm to the fetus, to infants, to children and to adults, defendants' medical and epidemiology experts testified that they had no opinion on causation," Judge Elihu Berle wrote in his ruling. "Defendants failed to satisfy their burden of proving ... that consumption of coffee confers a benefit to human health."

The Council has been lobbying the industry for eight years for the removal of the substance. The suit was brought under California’s Safe Drinking Water and Toxic Enforcement Act, better known as Proposition 65, which requires warning labels for about 900 chemicals known to cause cancer or birth defects.

Many coffee shops already have signs posted warning of the cancer-causing chemical in cancer – but often in out of the way places, where customers are unlikely to see them. Those signs must now be moved to more prominent positions, or shop owners could face civil penalties of up to $2,500 per person exposed. (The exact amount has yet to be determined.)

The industry is expected to file an appeal.