But the odds of substantial cognitive decline also increase after surgery - approximately doubling - although the likelihood of this is much lower than after admission to hospital for a medical condition, the findings show.
‘Cognitive decline is the gradual loss of brain functioning that occurs with ageing. It often starts decades before the conventional definition of old age and accelerates with ageing and the presence of an increasing number of underlying health conditions.
Certain health issues, such as stroke, can lead to a large "step change" in cognitive decline, and there have been concerns that surgery might also do this, with some patients refusing beneficial surgical procedures as a result, say the researchers.
Few previous studies have looked at the potential impact of major surgery on cognitive decline and most of them have relied on a single preoperative assessment of cognitive functioning rather than tracking cognitive decline over time.
To address this, the researchers accessed data on 7,532 British civil servants enrolled in the Whitehall II Study, which has been looking at the impact of social, behavioural, and biological factors on long term health.
All the patients were aged between 35 and 55 in 1985 and received up to five cognitive assessments over a 19-year period (1997 to 2016).
Any hospital admissions requiring at least a two-night stay were identified in hospital episode statistics. Overall, 8,982 "major" events were identified: 4,525 operations; 4,306 medical admissions; and 151 strokes.
Among the 7532 participants, 4954 weren't admitted to hospital for major surgery, but 1250 were: 613 for a medical condition and 715 for both reasons.
After accounting for age-related cognitive decline, the authors calculated that major surgery was associated with a small additional cognitive decline of less than five months (0.35 years), on average.
Admissions for medical conditions and stroke were associated with a far greater additional cognitive decline of 1.4 and 13 years, respectively.
Hospital admission for major surgery or a medical condition also increased the odds of substantial cognitive decline by 2.3 and 6.2, respectively.
Substantial cognitive decline occurred in 5.5% of patients who spent time in hospital for a surgical procedure and 12.7% of those treated in hospital for a medical condition, compared with 2.5% of people who had no major hospital admissions.
This is an observational study, so no firm conclusions can be drawn about cause and effect, and hospital admissions likely act as a surrogate measure for ill health, the researchers point out. What's more, no information on the type of anaesthesia used was available, so its potential role in any long-term cognitive change couldn't be assessed.
Nevertheless, the researchers conclude: "Overall our data suggest that major surgery is associated with a small long term mean change in the age-related cognitive trajectory, with the odds of substantial decline doubling."
While they emphasise that the impact of surgery on cognition is lower than for medical admissions, this needs to be explained to patients, they say. "This information should be conveyed to patients and be weighed against the potential health and quality of life benefits of surgery during informed consent."
Researchers in a linked editorial say, "This study is reassuring in that the authors found no large declines in cognition after surgery." But as cognition deteriorates towards the end of life and contact with health services increases during this time, further exploration into mortality is key, they add.
"Importantly, we need to know which risk factors are modifiable and which are not. If some of [the] findings (particularly those linked to non-surgical admissions) are closely related to dying it might be challenging to disentangle the preventable from the inevitable."
They conclude: "Although the Whitehall study cannot reflect the UK's population, estimates obtained from this cohort reinforce the need for action to shift population risk profiles for cognitive decline [...] across the life course."