Coffee has just about settled into its new image of being good for you - The Mayo Clinic says it's high in antioxidants and is said to protect against Parkinson's and type 2 diabetes - but new research could cast a shadow over the benefits.
According to the research, drinking more than four cups of coffee a day could be shortening your life. Younger people in particular should avoid heavy coffee drinking, the US investigators warned.
Drinking large amounts of coffee was found to raise the chances of men and women up to the age of 55 dying from any cause.
Consuming more than 28 cups a week increased their death rates by more than half, while having no effect on older people.
The research was based on data from a large scale American lifestyle study of 43,727 individuals aged 20 to 87.
Over an average period of 16 years, around 2,500 deaths were recorded, just under a third of which were due to heart and artery disease.
Participants who consumed higher amounts of coffee were also more likely to smoke, and had less healthy hearts and lungs.
The risk of death from all causes rose by more than 50% for both men and women younger than 55 years of age who drank in excess of 28 cups of coffee a week, the equivalent of four a day.
Coffee contains a complex mixture of thousands of chemicals and is a double-edged sword that can have both good and bad effects on health.
Recent research has shown coffee to be a major dietary source of antioxidants.
The beverage may offer potential benefits by reducing inflammation and boosting brain function, scientists - whose findings are reported in the journal Mayo Clinic Proceedings - said.
At the same time, coffee stimulates the release of adrenalin, inhibits insulin activity, increases blood pressure, and raises levels of homocysteine, a harmful chemical linked to heart disease and dementia.
Lead author Dr Junxiu Liu, from the University of South Carolina, said: "All of these mechanisms could counterbalance one another.
"Research also suggests that heavy coffee drinkers may experience additional risk through potential genetic mechanisms or because of confounding through the deleterious effects of other risk factors with which coffee drinking is associated.
"We hypothesise that the positive association between coffee and mortality may be due to the interaction of age and coffee consumption, combined with a component of genetic coffee addiction."
Co-author Dr Carl Lavie, from Ochsner Medical Center in New Orleans, said: "There continues to be considerable debate about the health effects of caffeine, and coffee specifically, with some reports suggesting toxicity and some even suggesting beneficial effects."
Although the results showed a link with all-cause mortality, coffee-drinking had no significant effect on death rates from heart and artery disease alone.
The researchers said while younger people should avoid too much coffee, more work was needed to explore its long-term effects in different populations.
The scientists took account of a range of risk factors for early death and heart disease, including physical activity levels, body mass, smoking, alcohol consumption, diabetes, raised blood pressure and cholesterol, and family history of disease.
Coffee consumption had a bigger impact on death rates of younger women, who are less likely to die early than men.
Compared with non-coffee drinkers, men under the age of 55 who drank more than 28 cups a week had a 56% increased chance of dying.
Women in the same age group who consumed this much were more than twice as likely to die as those who drank no coffee.
The scientists wrote: "For people 55 years and older, this association was not statistically significant for either sex.
"Hence, it may be appropriate to recommend that younger people, in particular, avoid heavy coffee consumption."