Women who get divorced, lose a child or suffer serious ill-health in their late 30s, 40s or 50s are much more likely to develop dementia in later life, research has suggested.

Experiencing high levels of stress in middle age, which can also include widowhood or seeing a close relative battle mental illness or alcoholism, raises the risk of a woman getting Alzheimer's disease by 21% and of getting any form of dementia by 15%, according to a study in the medical journal BMJ Open.

The research is unusual because it examined the different types of stress experienced by 800 Swedish middle-aged women in 1968 and then followed them at regular intervals for 38 years until 2005, noting how many displayed symptoms of distress such as fear, sleeping problems and irritability.

"Our study shows that common psychosocial stressors may have severe and longstanding physiological and psychological consequences," said the co-authors, led by Dr Lena Johansson, of the neuropsychiatric epidemiology unit at Gothenburg University.

Of the 800 women, 425 died during the course of the study while 153 (19%) developed dementia, at an average age of 78. "Stress may cause a number of physiological reactions in the central nervous, endocrine, immune and cardiovascular systems," the study concludes.

Although it says midlife stressful events are associated with an increased risk of dementia, it does not say there is a definitive, proven causal link. Simon Ridley, head of research at Alzheimer's Research UK, said: "From this study it is hard to know whether stress contributes directly to the development of dementia, whether it is purely an indicator of another underlying risk factor in this population of women, or whether the link is due to an entirely different factor."