A Los Angeles judge has ruled that Starbucks Corporation and other coffee companies must put a cancer warning label on coffee products sold in California because of a chemical produced in the roasting process.

Superior Court Judge Elihu Berle said in a proposed decision on Wednesday that Starbucks and other companies had failed to show that the threat from a chemical compound produced when roasting coffee was insignificant, court documents showed.

Starbucks declined to comment, referring to a statement by the National Coffee Association (NCA) saying the industry was considering an appeal and further legal actions.

Starbucks and some 90 other defendants in the case have until April 10 to file objections.

Other defendants include Green Mountain Coffee Roasters Inc, the JM Smucker Company and Kraft Foods Global, according to court documents.

The California-based Council for Education and Research on Toxics (CERT) first sued Starbucks and other companies in 2010 alleging they failed to provide warnings to consumers that the coffee they sold contained high levels of acrylamide, a toxic and carcinogenic chemical, court documents showed.

CERT argued that since acrylamide was classified as a carcinogen under California law, coffee sellers had to use warning labels to alert the millions of Californians drinking their products.

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 necessary to make the beans flavourful.

"While plaintiff offered evidence that consumption of coffee increases the risk of harm to the foetus, to infants, to children and to adults, defendants' medical and epidemiology experts testified that they had no opinion on causation," Judge Berle wrote.

"Defendants failed to satisfy their burden of proving by a preponderance of evidence that consumption of coffee confers a benefit to human health."

Case developing over eight years

The case has been developing for eight years and is still not over, while a third phase of trial will later determine any civil penalties that coffee companies must pay.

With potential penalties up to $US2,500 ($,3254) per person exposed each day over eight years, that figure could be astronomical in a state with close to 40 million residents — though such a massive figure is very unlikely.

In the first phase of the trial, Judge Berle said the defence failed to present enough credible evidence to show there was no significant risk posed by acrylamide in coffee.

The law put the burden on the defence to show that the level of the chemical will not result in one excess case of cancer for every 100,000 people exposed.

Judge Berle said the epidemiology studies presented were inadequate to evaluate that risk.

Having failed to show there was no significant risk to drinking coffee, the industry had to show during the trial's second phase that there should be a less strict level for coffee because of health benefits from drinking it — the judge said the coffee companies also failed to show that.

The judge could, however, reverse his tentative ruling — but that rarely happens