Exercise throughout a person's life plays a significant role in reducing the risk of developing dementia.
The Cardiff University study which began with 2,235 men from Caerphilly in 1979 found factors including diet and not smoking had an impact on preventing illnesses developing in older age.
The research by Cardiff University found the five factors that were integral to helping avoid disease were:
- regular exercise
- not smoking
- low bodyweight
- healthy diet
- low alcohol intake.
People in the study who followed four of these had a 60% decline in dementia and cognitive decline rates, with exercise named as the strongest mitigating factor.
They also had 70% fewer instances of diabetes, heart disease and stroke, compared with people who followed none of the factors.
Exercise had the single biggest influence on dementia levels.
Professor Peter Elwood, who led the study on behalf of Cardiff School of Medicine, said healthy behaviour was far more beneficial than any medical treatment or preventative procedure.
"The size of reduction in the instance of disease owing to these simple healthy steps has really amazed us and is of enormous importance in an ageing population," he said.
"Taking up and following a healthy lifestyle is however the responsibility of the individual him or herself.
"Sadly, the evidence from this study shows that very few people follow a fully healthy lifestyle."'More active lifestyle'
Prof Elwood stressed that while one aspect of the five strands of behaviour mentioned may have more impact on certain illnesses, the emphasis was on an overall healthy lifestyle.
"Exercise happens to be the most important but the other factors come in very close behind," he added.
He told BBC Wales while the recommended levels of exercise were half an hour five times a week, it did not mean having to go to a gym.
"We should all live a more active lifestyle. If I park my car a mile from work - that makes me likely to do more than the half an hour a day. Any exercise has some benefit and the more, the better."
The research showed that while smoking levels had dropped over the 35 years, the number of people leading what the team described as a fully healthy lifestyle had not changed.
Prof Elwood added: "If the men had been urged to adopt just one additional healthy behaviour at the start of the study 35 years ago, and if only half of them complied, then during the ensuing 35 years there would have been a 13% reduction in dementia, a 12% drop in diabetes, 6% less vascular disease and a 5% reduction in deaths."
Dr Doug Brown from the Alzheimer's Society said: "'We have known for some time that what is good for your heart is also good for your head, and this study provides more evidence to show that healthy living could significantly reduce the chances of developing dementia.
Health Minister Mark Drakeford said the study "threw into sharp relief" the extent to which preventing illness lay in a person's own hands.
The research is being published in the PLOS One journal.