A judge in California has ruled coffee sellers like Starbucks that operate within the state must include a cancer warning on their products due to the presence of the chemical acrylamide found in the drink, Associated Press reported.

The decision on the lawsuit, which was brought by the non-profit group the Council for Education and Research on Toxics, will affect nearly 100 individual coffee sellers within the state’s borders.

Starbucks Cups A California judge has ordered coffee sellers like Starbucks must include a cancer warning on their coffee. Photo: Photo by Stephen Chernin/Getty Images

The advocacy group argued that coffee companies have failed to warn customers about the potential dangers of acrylamide—a chemical that is considered a carcinogenic under California state law.

Los Angeles Superior Court Judge Elihu Berle agreed with the Council for Education and Research on Toxics, ruling that coffee sellers fell short of proving there is no harm associated with drinking coffee that contains acrylamide.

"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," Berle wrote in his decision. "Defendants failed to satisfy their burden of proving...that consumption of coffee confers a benefit to human health."

Acrylamide occurred in cooked or roasted starchy foods like toast, french fries, potato chips and coffee beans. The chemical is also found in cigarette smoke. While acrylamide can be harmful to humans, it’s unclear that levels in coffee are high enough to cause any concern.

The International Agency for Research on Cancer (IARC), part of the World Health Organization (WHO), labels acrylamide as a "probable carcinogen" but does not list coffee as a health risk. WHO moved coffee off its list of possible carcinogens in 2016 after finding that consumption of the drink may actually help prevent some forms of cancer.

The Council for Education and Research on Toxics previously brought a similar lawsuit against the makers of potato chips, claiming the presence of acrylamide in the food could expose consumers to the harmful carcinogen.

The group has brought its lawsuits by using the California Safe Drinking Water and Toxic Enforcement Act, also known as Proposition 65. The law requires warning labels to be included on products that contain any of more than 900 chemicals known to have harmful health implications for humans.

"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, who added that coffee had been shown to be a healthy beverage.

BBC reports coffee companies in California will have until April 10 to appeal the court’s decision.