Updated

A Los Angeles judge has ruled that coffee companies need to carry a cancer warning label in California.

Superior Court Judge Elihu Berle said in a proposed decision Wednesday that Starbucks and other coffee companies failed to prove the threat from a chemical compound produced during coffee roasting was insignificant.

The chemical, acrylamide, is a carcinogen created when coffee beans are roasted. The carcinogen is one in a list of chemicals the state of California considers possible causes of cancer. Alcoholic beverages are also on the list.

The lawsuit was first filed in 2010 by a nonprofit group who targeted coffee roasters, distributors and retailers that make or sell coffee for failing “to provide clear and reasonable warning” that drinking coffee could expose people to acrylamide.

Under the California Safe Drinking Water and Toxic Enforcement Act of 1986, businesses must inform customers about the presence of substances that may affect their health. The act, also known as Prop 65, applies to all “retail, mail order, and Internet sales of products, even if sold out of the state,” according to the state website.

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

The coffee industry had claimed the chemical was present at harmless levels and should be exempt from the law because it results naturally from the cooking process to make the beans flavorful.

“Coffee has been shown, over and over again, to be a healthy beverage. This lawsuit has made a mockery of Prop 65, has confused consumers, and does nothing to improve public health,” National Coffee Association President and CEO William “Bill” Murray responded.

Proposed California judicial decisions can still be reversed, but rarely are.

Fox News' Jessica Meadows and The Associated Press contributed to this report.