A study found that elderly people who suffer depression for more than three years are over a fifth more at risk of dementia.
Having the blues which progressively get worse over the years could be an early sign of the common condition.
But people who have just episodes of feeling down and get better or low symptoms of depression are not at a greater risk.
It is estimated around 800,000 Britons have dementia and one in three over 65 will develop dementia, two-thirds of them women. Symptoms include memory loss, a decline in mental agility, understanding and judgement.
Sufferers can become apathetic or uninterested in their usual activities, and have problems controlling their emotions.
The results were based on the first ever long-term study to examine the link between dementia and the course of depression.
Depression affects people differently so scientists from the Erasmus University Medical Centre in Rotterdam divided 3,325 participants, aged over 55, into five groups depending on its severity.
Subjects had either low depression symptoms (2441 participants); initially high symptoms that decreased (369); low starting scores that increased then eased (170); initially low symptoms that increased (255); and constantly high symptoms (90).
The study tracked their depressive symptoms for more than 11 years and the risk of dementia for a subsequent 10 years.
It found 434 developed dementia, including 348 cases of Alzheimer's disease.
In the group with low symptoms of depression - which was used as a benchmark - 10 per cent or 226 of the 2,174 developed dementia.
Only the group whose symptoms of depression increased over time was at an increased risk of dementia- 22 per cent of people or 55 of the 255 in this group developed dementia.
This risk was particularly pronounced after the first three years.
Individuals with remitting symptoms of depression were not at an increased risk of dementia compared to individuals with low depressive symptoms.
This suggested that having severe symptoms of depression at one point in time does not necessarily have any lasting influence on the risk of dementia.
Head of neuroepidemiology Dr Arfan Ikram said: "Depressive symptoms that gradually increase over time appear to better predict dementia later in life than other trajectories of depressive symptoms such as high and remitting, in this study.
"There are a number of potential explanations, including that depression and dementia may both be symptoms of a common underlying cause, or that increasing depressive symptoms are on the starting end of a dementia continuum in older adults.
"More research is needed to examine this association, and to investigate the potential to use ongoing assessments of depressive symptoms to identify older adults at increased risk of dementia."
The study said the findings supported the hypothesis that increasing symptoms of depression in older age could potentially represent an early stage of dementia and previous suggestions that dementia and some forms of depression may be symptoms of a common cause.
At the molecular levels, the biological mechanisms of depression and neurodegenerative diseases overlap considerably including the loss of ability to create new neurons, increased cell death and immune system dysregulation.
Commenting on the study Dr Simone Reppermund at the University of New South Wales said: "In conclusion, several factors can contribute to the development of both depression and dementia.
"The questions are if, and how, the presence of depression modifies the risk for dementia.
"The study provides an answer to the first question: depression, especially steadily increasing depressive symptoms, seems to increase the risk for dementia.
"However, the question of how the presence of depressive symptoms modifies the risk of dementia still remains."