LOS ANGELES (Reuters) - Starbucks Corp and other roasters and retailers must serve up a cancer warning with coffee sold in California, a Los Angeles judge has ruled.

A cup of coffee is pictured in the Manhattan borough of New York City, U.S. May 12, 2017. REUTERS/Carlo Allegri

Superior Court Judge Elihu Berle in a ruling published on Monday said that Starbucks and other coffee sellers did not show that the risk from consuming acrylamide, a possible cancer-causing byproduct created during coffee roasting, was offset by benefits from drinking coffee.

That ruling confirmed Berle’s tentative decision on the matter in March.

The Council for Education and Research on Toxics (CERT), a nonprofit group, sued some 90 coffee retailers, including Starbucks, on grounds they were violating a California law requiring companies to warn consumers of chemicals in their products that could cause cancer.

The latest ruling in the eight-year legal battle opens a path for CERT to ask for a permanent injunction that would require coffee sellers to warn consumers about the cancer risk associated with acrylamide.

Many California coffee sellers, including Starbucks, already post signs with such warnings under the state’s Proposition 65 law requiring businesses to provide warnings about significant exposures to chemicals that cause cancer, birth defects or other reproductive harm.

“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,” said William Murray, president and chief executive of the National Coffee Association.

Attorney Raphael Metzger, who represents CERT, hopes that the final ruling will lead to a settlement where coffee sellers reformulate their product to remove acrylamide, as potato chip sellers did after a similar lawsuit.

“Just giving warnings to people who are really addicted to the product, like me, doesn’t do much,” said Metzger.

Starbucks did not immediately respond to requests for comment.

Several defendants in the case have already settled, agreeing to post warning signs and pay millions in fines.