“I’ll have the double espresso with human carcinogen.”

Okay, Starbucks will probably develop more subtle language if a California judge decides that coffee shops, convenience stores and other places that sell hot caffeinated beverages have violated a state law that requires businesses to provide “clear and reasonable warning” about chemicals known to cause cancer.

Should it be handed down this year, the ruling would end a protracted battle between a California nonprofit and dozens of coffee retailers, including Starbucks and other major national chains. At issue is whether coffee in California should come with a cancer warning because, when the drink is brewed with hot water, it naturally produces a chemical known as acrylamide.

Should the coffee retailers lose the case, they face millions of dollars in fines. Should they win, Californians may have to take their chances on a beverage that may or may not cause long-term health problems.

The state of California lists acrylamide, a byproduct of the cooking process known as the Maillard reaction, among the chemicals known to cause cancer or reproductive toxicity. Acrylamide has been on the list since Jan. 1, 1990, although scientists didn’t discover the chemical’s presence in cooked foods until 2002, when the Swedish National Food Administration reported on the subject. Acrylamide also can be found in french fries, potato chips, bread and other grain products.

Eight years after that Swedish report, the Council for Education and Research on Toxics filed a civil complaint against Starbucks, Peet’s Coffee, Seattle Coffee and other companies over what it called violations of the Safe Drinking Water and Toxic Enforcement Act, also known as Proposition 65. The law, passed by voters in 1986, requires all companies with 10 or more employees in California to provide clear warnings before exposing customers to any chemicals found on the state’s list of known carcinogens.

“Defendants concealed from Californians and from Plaintiff that their ready-to-drink coffee contained a chemical known to the state to cause cancer,” the complaint alleges. The suit wants Starbucks, Peet’s and the rest to start posting signs, warning consumers about the potential dangers of acrylamide, as well pay fines as large as $2,500 per person for every exposure to the chemical since 2002 at the defendants’ shops. The civil fines could be astronomical.

Several of the defendants have settled, according to published reports. Among them are BP West Coast Products, which operates gas stations and convenience stores; Yum Yum Donuts; and 7-Eleven stores.

But Starbucks and others major chains remain locked in the legal battle. Starbucks, as the lead defendant, has declined to comment, referring reporters to the National Coffee Association. The group’s president and chief executive, William “Bill” Murray, issued a statement:

“Coffee has been shown, over and over again, to be a healthy beverage. The U.S. Government’s own Dietary Guidelines state that coffee can be part of a healthy lifestyle. This lawsuit simply confuses consumers, and has the potential to make a mockery of [Proposition] 65 cancer warning at a time when the public needs clear and accurate information about health.”

Passed by voters to curb the industrial pollution of the state’s drinking water, Proposition 65 has been a success at protecting Californians from potential toxins — and a boon to attorneys, private citizens and others who can sue on behalf of the state and claim part of the civil penalties. Some businesses, according to numerous reports, say Prop 65 — with its list of hundreds of suspected carcinogens — has provided ammunition for lawyers to shake down companies for settlements.

In fact, according to USA Today, the law firm representing CERT in the coffee case also represented the nonprofit in a similar complaint with potato chip manufacturers. Like hot coffee extracted from beans, chips made from fried potatoes contain acrylamide. In 2008, the Metzger Law Group, according to USA Today, settled with chip producers, which agreed to “pay $3 million and remove acrylamide from their product.”

Attorneys for Metzger did not immediately return a pair of phone calls from The Washington Post.

In the complaint against coffee shops, Metzger and CERT argue that even a 12-ounce serving of hot coffee “contains approximately 10 times more acrylamide than the No Significant Risk Level (‘NSRL’) for acrylamide established by California Office of Environmental Health Hazard Assessment.”

To date, the defendants have argued in court that coffee should be included under Prop 65’s exemption for chemicals that occur naturally during the cooking process. They’ve also argued for the many health benefits of coffee, such as a reduced risk of liver disease and Type 2 diabetes, not to mention a lowered risk of Alzheimer’s disease and prostate cancer. (Then again, studies have linked coffee to increased risks of heart attacks and hypertension.)

The scientific evidence linking acrylamide to cancer in humans is scant. According to the American Cancer Society, studies have found that acrylamide increases the risk of cancer in rats and mice when the chemical is placed in the animals’ drinking water at doses “1,000 to 10,000 times higher than the levels people might be exposed to in foods.” The society doesn’t know yet how the results would translate to humans, but it suggests limiting your intake of acrylamide.

As for studies with people, the American Cancer Society notes, “Most of the studies done so far have not found an increased risk of cancer in humans. For some types of cancer, such as kidney, endometrial and ovarian cancer, the results have been mixed, but there are currently no cancer types for which there is clearly an increased risk related to acrylamide intake.”

The Food and Drug Administration notes that acrylamide is a “human health concern,” but it stops short of recommending that people stop eating foods that contain the chemical. The agency is continuing to study it.

Both sides in the California coffee standoff will sit down for a private mediation later this month, according to a CNN story. But if they can’t come to an agreement, a decision will fall to the judge in the case. Judge Elihu M. Berle could be the person who decides whether a cup of coffee in California comes with a shot of cancer warnings.

More from Food: