People who move around more have sharper brains than couch potatoes, even well into old age and even if they already have some brain deterioration, researchers reported Wednesday.

The research helps answer a big question of whether exercise prevents dementia, or whether people with dementia-related damage to their brains move less because of that damage.

The new findings indicate that exercise and other activity helps preserve memory and brain function despite the various damage that leads to dementia, including hardened arteries and the brain-clogging plaques that are the hallmark of Alzheimer’s.

“Higher activity is better for both people with and without dementia,” said Dr. Aron Buchman of Rush University Medical Center in Chicago.

Buchman and colleagues studied 454 people starting in 1997 and following them until they died. Most were in their late 80s or early 90s when they died. These volunteers took regular tests of their memory and thinking, wore wrist devices to measure their daily activity, and gave permission for their brains to be examined after they died.

As has been found many times before, those who exercised more, or even moved around in daily life more, had clearer thinking and better memory well into old age. Researchers know this, but it had not been clear if exercise stopped some of the brain damage associated with memory loss. These pathologies included the plaques associated with Alzheimer’s, clogged or hardened arteries, and damage done by strokes or mini-strokes.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

When the brains of the volunteers were studied after they died, the researchers found just about the amount of age-related damage in 236 who did not have dementia and the 191 who did. “On average, participants had three different brain pathologies,” the researchers wrote in their report, published in the journal Neurology.

“One or more pathologies were observed in nearly all cases.”

Despite that, those who exercised or even just moved around more had clearer thinking right up to just before the time they died.

And the benefits did not just go to people who went to the gym or ran miles every day.

“We were measuring total daily activity, so we were measuring both exercise and routine daily activity,” Buchman told NBC News.

There was not a set amount of exercise that seemed to matter. There was just a clear association: the more people moved around, the better they scored on a battery of memory and thinking tests.

“Older people who can’t get out of the house to go to the gym … can still accrue some of the cognitive reserve and benefit by increasing whatever activity they are already doing," Buchman said. Surrendering to disability by just sitting motionless in a chair all day may hasten memory loss, he said.

“Some people can’t exercise in the traditional sense of the word,” Buchman added. “The inference here is a more active lifestyle, whatever that is, may provide benefit.”

One question the study didn’t answer was whether any of the volunteers were lifelong exercisers. That’s another question to answer, Buchman said. Exercise levels were measured when people were already in their late 80s.

One theory had been that exercise protects the brain from the damage caused by aging. This study didn’t give any clues as to how that might be happening. “There must be other proteins or molecular mechanisms that we didn’t check or new pathologies that are waiting to be discovered,” he said.

The findings support the idea that exercise and other activity give the brain an extra resilience and what's called cognitive reserve — extra resources that the brain can call on to keep memory and thinking clear even as brain cells die.

“We still showed that in the people without dementia that there are still associations of higher levels of activity with higher cognition,” Buchman said.

More than 5 million Americans have Alzheimer’s, and this is expected to snowball as the population ages. There’s no cure, and treatments do not work well. Drugs such as Aricept, known also as donezepil, and Namenda can reduce symptoms for a time but they do not alter the course of the disease.

But more and more evidence shows exercise can preserve brain cells and might prevent dementia, or at least delay it.

Exercise lowers blood pressure, improves cholesterol levels and ramps up the immune system. It can slow the brain shrinkage seen with aging, also.