Many of us depend on a mug of freshly brewed coffee to perk us up in the mornings.
But its mood-boosting effect could well be lasting far longer than we realise, claim scientists.
They have discovered that women who drink four or more cups a day are a fifth less likely to become depressed.
And those who drink between two or three reduce their risk by 15 per cent.
Researchers at Harvard University compared the coffee intake and risk of depression amongst nearly 51,000 women over ten years.
They did not look at men—but other studies have found it has a similar effect.
The scientists, whose findings are published in the Journal of American Medicine Association, think that caffeine works like antidepressant pills by stopping the production of certain hormones such as serotonin.
Dr Michel Lucas, from the Harvard School of Public Health in Boston, said: 'Our results support a possible protective effect of caffeine, mainly from coffee consumption, on risk of depression.
The scientists pointed out that caffeine had 'well-known psychostimulant effects' including 'increased sensations of well-being and energy'.
They think that in future coffee could be used as an antidepressant or as a means of preventing depression.
Only last year a study in Finland discovered that men who drank more than four cups a day were also far less likely to become depressed.
And last month German researchers claimed that women are now twice as likely to suffer from depression compared with 40 years ago because they are trying to juggle families and careers.
It is already known that coffee can help stave off a range of illnesses including prostate cancer, gout and Alzheimer's and may even boost brain power.
But it isn't entirely beneficial—and you can have too much.
Scientists have also shown that can raise the blood pressure and increase the heart rate.
And pregnant women are advised to drink no more than two cups a day to reduce the likelihood of a miscarriage or their babies being underweight.