Drinking coffee could reduce the risk of alcohol-related liver disease.
A US study of 125,580 men and women over 20 years found a 22% reduced risk of developing alcoholic cirrhosis for each cup of coffee drank per day.
But tea was not associated with a reduced risk, indicating caffeine may not be the link, the study in Archives of Internal Medicine concluded.
Experts warned that even if coffee was protective, reducing alcohol intake was the only way to avoid liver damage.
The researchers from California looked at health records of patients who had undergone voluntary examinations between 1978 and 1985.
"The impact of drinking too much on an individual often does vary dependent on a number of factors, and that may well include diet"
Spokesperson, Alcohol Concern
By 2001, 330 people were diagnosed with liver cirrhosis, 199 of whom had cirrhosis due to drinking.
Drinking less than one cup of coffee a day was found to reduce the risk of alcoholic cirrhosis by 30%; one to three cups by 40%; and four or more cups by 80%.
There was also a small but non-significant reduction in other forms of cirrhosis - not associated with alcohol - in coffee drinkers.
To look at liver damage the team measured certain enzymes in the blood.
As expected, levels of the enzymes were significantly higher in heavy drinkers, however those who drank both alcohol and coffee had lower levels than those who drank alcohol but not coffee, with the strongest relationship in the heaviest drinkers.
Tea was not found to be associated with a decreased risk of cirrhosis suggesting that an ingredient other than caffeine is responsible for the drop.
The researchers said they could not be absolutely sure whether or not caffeine was the key ingredient because tea drinking was not particularly popular among the study population.
But identifying the ingredient responsible could open the way for potential preventive treatment.
Alcohol intake
Writing in the journal, Dr Arthur Klatsky at the Kaiser Permanente Division of Research in California said: "Even if coffee is protective, the primary approach to reduction of alcoholic cirrhosis is avoidance or cessation of heavy alcohol drinking.
"Assuming causality, the data do suggest that coffee intake may partly explain the variability of cirrhosis risk in alcohol consumers.
"Basic research about hepatic coffee-ethanol interactions is warranted, but we should keep in mind that coffee might represent only one of a number of potential cirrhosis risk modulators."
A spokesperson for Alcohol Concern said: "The impact of drinking too much on an individual often does vary dependent on a number of factors, and that may well include diet.
"It's important that people realise that drinking too much does have real risks attached to it - including alcoholic liver disease and other serious long-term health problems.
"The most effective way to protect yourself against the health consequences of drinking too much is to stay within safe limits - two to three units a day for a women, and three to four a day for a man."
Professor Chris Day, who is Professor of Medicine at the Centre for Liver Research, Newcastle University was impressed by the findings.
"While the linking of coffee to a reduced risk of cirrhosis has been suggested before, this study is the largest to date.
"Although the study has not addressed the reason why this reduction might be, it does emphasise that further research should be done.
"It should not be forgotten that obesity is also associated with an increased risk of cirrhosis, a fact often overshadowed by the emphasis on alcohol," he added.
BBC health
So take coffee for a hangover?