Playing a musical instrument could help protect against mental decline through age or illness, according to a new study.
Musicians have sharper minds and are able to pick up and correct mistakes quicker than non-musicians, researchers at St Andrews University found.
They measured the behavioural and brain responses of amateur musicians compared with non-musicians when performing simple mental tasks.
The results showed that playing a musical instrument, even at moderate levels, improves a person's ability to detect errors and adjust responses more effectively.
Musicians also responded faster than those with little or no musical training, with no loss in accuracy, the study found.
The research was led by psychologist Ines Jentzsch, a reader in the university's School of Psychology and Neuroscience.
"Our study shows that even moderate levels of musical activity can benefit brain functioning," she said.
"Our findings could have important implications as the processes involved are amongst the first to be affected by ageing, as well as a number of mental illnesses such as depression.
"The research suggests that musical activity could be used as an effective intervention to slow, stop or even reverse age or illness-related decline in mental functioning."
The study, published in the journal Neuropsychologia, builds on previous work showing the benefits of musical activity on mental and physical well-being.
Pianist Dr Jentzsch said: "Musical activity cannot only immensely enrich our lives but the associated benefits for our physical and mental functioning could be even more far-reaching than proposed in our and previous research."