Being overweight cuts the risk of dementia, according to the largest and most precise investigation into the relationship.
The researchers admit they were surprised by the findings, which run contrary to current health advice.
The analysis of nearly two million British people, in the Lancet Diabetes & Endocrinology, showed underweight people had the highest risk.
Dementia charities still advised not smoking, exercise and a balanced diet.
Dementia is one of the most pressing modern health issues. The number of patients globally is expected to treble to 135 million by 2050.
There is no cure or treatment, and the mainstay of advice has been to reduce risk by maintaining a healthy lifestyle. Yet it might be misguided.
The team at Oxon Epidemiology and the London School of Hygiene and Tropical Medicine analysed medical records from 1,958,191 people aged 55, on average, for up to two decades.
Their most conservative analysis showed underweight people had a 39% greater risk of dementia compared with being a healthy weight.
But those who were overweight had an 18% reduction in dementia - and the figure was 24% for the obese.
"Yes, it is a surprise," said lead researcher Dr Nawab Qizilbash.
He told the BBC News website: "The controversial side is the observation that overweight and obese people have a lower risk of dementia than people with a normal, healthy body mass index.
"That's contrary to most if not all studies that have been done, but if you collect them all together our study overwhelms them in terms of size and precision."
Any explanation for the protective effect is distinctly lacking. There are some ideas that vitamin D and E deficiencies contribute to dementia and they may be less common in those eating more.
But Dr Qizilbash said the findings were not an excuse to pile on the pounds or binge on Easter eggs.
"You can't walk away and think it's OK to be overweight or obese. Even if there is a protective effect, you may not live long enough to get the benefits," he added.
Heart disease, stroke, diabetes, some cancers and other diseases are all linked to a bigger waistline.
By James Gallagher, Health editor, BBC News website
These findings have come as a surprise, not least for the researchers themselves.
But the research leaves many questions unanswered.
Is fat actually protective or is something else going on that could be harnessed as a treatment? Can other research groups produce the same findings?
Clearly there is a need for further research, but what should people do in the meantime?
These results do not seem to be an excuse to eye up an evening on the couch with an extra slice of cake.
The Alzheimer's Society and Alzheimer's Research UK have both come out and encouraged people to exercise, stop smoking and have a balanced diet.
Dr Simon Ridley, of Alzheimer's Research UK, said: "These new findings are interesting as they appear to contradict previous studies linking obesity to dementia risk.
"The results raise questions about the links between weight and dementia risk. Clearly, further research is needed to understand this fully."
The Alzheimer's Society said the "mixed picture highlights the difficulty of conducting studies into the complex lifestyle risk factors for dementia".
Prof Deborah Gustafson, of SUNY Downstate Medical Center in New York, argued: "To understand the association between body mass index and late-onset dementia should sober us as to the complexity of identifying risk and protective factors for dementia.
"The report by Qizilbash and colleagues is not the final word on this controversial topic."
Dr Qizilbash said: "We would agree with that entirely."