Smoking accelerates normal brain ageing in ways that can impair thinking skills such as planning, decision-making and problem-solving, research has shown.
The good news is that it might be possible to reverse the harmful effects by giving up the habit, even late in life, say scientists.
Researchers analysed magnetic resonance imaging (MRI) brain scan data on 504 men and women with an average age of 73.
Around half the participants were former or current smokers while the rest had avoided tobacco all their lives.
The findings showed that smoking appeared to increase the rate at which the outer layer of the brain, or cerebral cortex, thins with age.
This is the part of the brain linked to many higher functions, and plays a key role in memory, attention, language and awareness.
Lead scientist Professor Ian Deary, director of the centre for cognitive ageing at the University of Edinburgh, said: "It is important to know what is associated with brain health in older age and our study shows that the rate of smoking-related thinning to the brain is approximately twice the rate observed in previous, smaller studies.
"However, at the same time, our study also suggests that stopping smoking might allow the brain's cortex to recover some of its thickness, though we need to conduct further studies to test this."
Study participants who had given up smoking some time ago seemed to have a thicker cerebral cortex than more recent quitters, suggesting that they had experienced some degree of recovery.
The research, published in the journal Molecular Psychiatry, is part of The Disconnected Mind, a larger project investigating brain ageing funded by Age UK.
Professor James Goodwin, chief scientist at the charity, said: "We all know smoking is bad for our lungs and heart, but it's important we also understand just how bad it is for our brain. This study shows how smoking speeds up the decline of the important thinking skills we rely on - in a sense accelerating brain ageing - in addition to increasing the risk of dementia and many other illnesses.
"While avoiding smoking is the best way to reduce the risk of brain decline, dementia and other cognitive diseases, this study gives new hope that quitting smoking, even in mid-life, can bring important benefits to the brain, as well as the rest of the body.
"With research suggesting that older people's fear of developing dementia outweighs that of cancer, it is important we inform people about the simple steps they can take to safeguard against this horrible and distressing disease. Brain decline is not an inevitable part of ageing, it is something we can protect ourselves against by making changes to our lifestyle - with avoiding smoking being one of them."