Researchers used these records on more than 429,000 workers, most of whom were shopkeepers or craftsmen such as bakers and woodworkers. They were 74 on average and had been retired for an average of 12 years.

Nearly 3 percent had developed dementia but the risk of this was lower for each year of age at retirement. Someone who retired at 65 had about a 15 percent lower risk of developing dementia compared to someone retiring at 60, after other factors that affect those odds were taken into account, Dufouil said.

To rule out the possibility that mental decline may have led people to retire earlier, researchers did analyses that eliminated people who developed dementia within 5 years of retirement, and within 10 years of it.

“The trend is exactly the same,” suggesting that work was having an effect on cognition, not the other way around, Dufouil said.