As you age, it becomes more important to stay fit to keep your body healthy and resilient against physical signs of aging. But it's not just your body that benefits: Staying in shape could also keep your mind sharp.

A new study from researchers at Boston University Medical Center found that older adults who scored high on cardiorespiratory fitness (CRF) tests performed better on memory tasks.

Read: Exercise Benefits: Even A Minimal Amount Of Physical Activity Will Make You Happier, Healthier

Study participants included healthy young adults between the ages of 18 and 31, as well as older adults ranging from 55 to 74 years old. According to a press release, the group spanned wide ranges of fitness levels.

Researchers asked participants to walk and jog on a treadmill; by measuring the ratio of inhaled and exhaled oxygen and carbon dioxide, the team was able to assess their cardiorespiratory fitness. Additionally, the group underwent MRI scans while learning the names of faces they were shown and demonstrating memory in matching the names and faces.

Having trouble learning and remembering new information is often a symptom of the cognitive decline associated with agin.

Results showed that, in older adults, age-related changes in memory performance and brain activity largely depended on their fitness level. In fact, the more fit older adults actually showed greater activation than younger participants in some brain regions.

“Importantly, CRF is a modifiable health factor that can be improved through regular engagement in moderate to vigorous sustained physical activity such as walking, jogging, swimming, or dancing,” corresponding study author Scott Hayes, PhD, said in a press release.

Read: Aging Brain: Distractions And Reduced Focus Could Help The Minds Of People Over 50

“Therefore, starting an exercise program, regardless of one’s age, can not only contribute to the more obvious physical health factors, but may also contribute to memory performance and brain function,” Hayes explained.

Source: Hayes SM, Hayes Jp, Williams VJ, Liu H, Verfaellie M. FMRI activity during associative encoding is correlated with cardiorespiratory fitness and source memory performance in older adults. Cortex. 2016.

Read Also:

How Aging Changes The Human Brain: As You Get Older, Even The Mind Becomes More Flabby

Slow Down Aging In The Human Brain: Ultrasound Scans May Delay Cognitive Decline