Everything you need to know about the surprising ruling.

A judge in California has ruled that coffee companies should post signs warning customers that coffee causes cancer. Scientific studies have still not reached a final verdict on whether or not coffee is healthy, although some studies suggest that drinking could reduce our risk of developing diabetes and heart disease.

The judge’s reasoning comes from the fact that the coffee-roasting process naturally produces a known carcinogen called acrylamide.

The Council for Education and Research on Toxics brought the lawsuit against the coffee industry, including chains like Starbucks and Peets, eight years ago. According to the Washington Post, the lawsuit alleges that these companies violated “a state regulation requiring businesses with at least 10 employees to disclose the prevalence of carcinogens and toxic chemicals.”

The non-profit was acting under the auspices of The Safe Drinking Water and Toxic Enforcement Act, which requires that warning labels be posted to chemicals that are known to cause cancer. It also allows advocacy groups like this one to sue on behalf of the state if these warnings are not available to the public.

Judge Elihu Berle sided with the nonprofit, writing that the “…Defendants failed to satisfy their burden of proving by a preponderance of evidence that consumption of coffee confers a benefit to human health."

The defendants in the case, including Starbucks, did not deny that acrylamide is present in coffee, however, the coffee companies failed to show that the chemical “posed no risk” to coffee drinkers.

"This lawsuit has made a mockery of Prop. 65, has confused consumers and does nothing to improve public health,” said William Murray, president and CEO of the National Coffee Association, after the judge passed his ruling.

The defendants have a few more weeks to challenge the ruling. According to the American Cancer Association, scientific studies conducted on humans “have found no consistent evidence that dietary acrylamide exposure is associated with the risk of any type of cancer.”