Mental agility can be boosted by even a short period of learning a language, a study suggests.

Tests carried out on students of all ages suggest that acquiring a new language improves a person's attention, after only a week of study.

Researchers also found that these benefits could be maintained with regular practice.

A team from the University of Edinburgh assessed different aspects of mental alertness in a group of 33 students aged 18 to 78 who had taken part in a one-week Scottish Gaelic course.

Researcher's tracked people's attention levels with a series of listening tests including the ability to concentrate on certain sounds and switch the attention to filter relevant information.

They compared the results with those of people who had completed a one week course - but not involving learning a new language - and with a group who had not completed any course.

After one week, improvements in attention were found in both groups participating in intensive courses, but only those learning a second language were significantly better than those not involved in any courses.

This improvement was found for all ages, from 18 to 78 years, which researchers say demonstrates the benefits of language learning also in later life.

Nine months after the initial course all those who had practised five hours or more per week improved from their baseline performance.

The researchers say this shows the mental skills gained from language learning can be maintained if speakers practise continuously.

Lead researcher, Dr Thomas Bak of the School of Philosophy, Psychology and Language Sciences said the results confirm the cognitive benefits of language learning.

He said: "I think there are three important messages from our study: firstly, it is never too late to start a novel mental activity such as learning a new language. Secondly, even a short intensive course can show beneficial effects on some cognitive functions. Thirdly, this effect can be maintained through practice."

The study was completed with the help of students from Sabhal Mòr Ostaig, the National Centre for Gaelic language and culture on the Isle of Skye, which forms part of the University of the Highlands and Islands.

Professor Boyd Robertson, Principal of the College said: "I welcome the study's identification of the cognitive benefits gained from learning Gaelic on our short courses. HMI audits have previously found that students have derived social benefits from these courses and this new research confirms that short course study at the College confers threefold benefits - linguistic, cognitive and social."

The study, Novelty, Challenge and Practice: The Impact of Intensive Language Learning on Attentional Functions is published in the journal PLOS ONE.

The research is supported by the AHRC Open World Research Initiative grant "Multilingualism: Empowering Individuals, Transforming Societies."