Middle-aged people who are overweight have an increased risk of dementia, a new analysis has found.

The research, based on 39 studies across Europe, the United States and Asia, looked at the health of more than 1.3 million adults.

It concluded that people who were diagnosed with dementia generally had a higher Body Mass Index (BMI) in midlife, but a lower one in old age.

Of the 1,349,857 people who took part in the study, 6,894 were recorded as developing dementia, the research published in the Alzheimer’s and Dementia Journal said.

BMI is a measure taking into account a person’s height and weight.  A healthy BMI is in the 18.5 to 24.9 range, according to the NHS.

Twenty-five to 29.9 means someone is overweight, while 30 or above means someone is obese.

The study, which involved researchers from University College London, the University of Edinburgh and the University of Bristol as well as others from institutions in Sweden, France and Finland, said “higher BMI was associated with increased dementia risk when weight was measured (more than) 20 years before dementia diagnosis (typically in midlife), but this association was reversed when BMI was assessed (less than) 10 years before dementia diagnosis (typically in old age).”

Dr Rosa Sancho, from the charity Alzheimer’s Research UK, said the reason for some sufferers having a lower BMI in the years leading up to their diagnosis could be due to effects of the condition.

She said: “This large study links a higher BMI with an increased risk of dementia later in life and underlines the importance of maintaining a healthy weight to help support a healthy brain.

“While the researchers found that people with dementia actually tended to have a lower BMI in the years leading up to a diagnosis­­ – this could be a consequence of the early stages of a disease like Alzheimer’s, rather than a factor affecting risk.

“We know that diseases that cause dementia get under way in the brain many years before symptoms start to show, so our lifestyle in midlife can have a particularly strong impact on our brain health in later life.

“While BMI can be a crude measure and not necessarily a good indication of our general health, limiting the amount of body fat we carry is important for a healthy body and a healthy brain.”