Mounting research is showing that strength workouts, especially when focused around leg building, may do as much for your brain as they do for the rest of your body.

A study of identical twins found that leg strength, more than other lifestyle factors assessed, was the best predictor of cognitive function 10 years later. The research, published in 2015 in the journal Gerontology, looked at 324 female twins ranging in age from 43 to 73.  The twin with the stronger legs at the start of the study maintained her mental abilities and had fewer age-related brain changes than the twin with the weaker legs.  A stronger body, it turns out, makes for a stronger brain.

Older women develop fewer memory-impairing lesions on their brains when they perform basic, twice-weekly strength-training workouts, according to a 2015 study published in the Journal of the American Geriatrics Society. And people with MCI — mild cognitive impairment, a precursor to dementia — see a boost in brainpower when they pump iron, Australian researchers found.

Even a single bout of strength training can support memory, according to a 2014 study. Strength work, researchers suggest, increases salivary alpha amylase, a biomarker for stress and arousal that may increase brain activity. So even healthy brains get a near-instantaneous lift from hitting the weights.

Scientists don’t fully understand why and how these changes occur, says but one theory argues that strength training releases insulin-like growth factor 1 (IGF-1), a protein that promotes neuronal growth. Another possibility: Systemic changes in the metabolic and cardiovascular systems create a healthy environment where the brain thrives.

“Resistance training is beneficial in reducing cardiometabolic risk factors, which are associated with cognitive impairment,” says Teresa Liu-Ambrose, PT, PhD, an expert on physical activity and cognitive neuroscience at the University of British Columbia in Vancouver.. “So resistance training, like aerobic training, benefits the brain by reducing chronic conditions that negatively impact the brain.”