The Food and Drug Administration (FDA) warns that the popular cholesterol-lowering medications may cause memory loss and confusion, but long term use of the medications may reduce that risk.

In a review of 16 studies that involved people taking statin medications who were also tested on memory, attention and organizational skills, researchers at Johns Hopkins University report that longer term use of the drugs may prevent dementia. In their analysis, published in the Mayo Clinic Proceedings, the team also found that use of statins for less than a year did not have any adverse effects on cognitive functions.

That finding is reassuring for the millions of patients currently taking the medications to protect against heart disease. After several short term studies revealed an association between the drugs and a higher risk of memory loss and confusion, the FDA in 2012 added a warning to the label of statin medications, alerting users to the risk.

MORE: Should You Take Statins? Study Says Heart Benefits Outweigh Diabetes Risk

But according to Dr. Seth Martin, a cardiovascular fellow at the Johns Hopkins Ciccarone Center for the Prevention of Heart Disease, “people who are able to tolerate statins over the long term not only show a clear cardiovascular benefit in terms of protection from heart attack and stroke, but there is also a strong suggestion that they may be benefiting from less dementia.”

In their analysis, Martin and his colleagues included studies that were released after the FDA’s label change. The review included trials in which patients taking statins were compared to those taking placebo over a range of follow up periods from less than one year to up to 25 years. Even among the short term users, he says, there was no evidence of harm from the statins when it came to cognitive functions. “We saw a lot of people come into clinics who were worried after the FDA warning came out,” he says. “One of the messages from this study is that there doesn’t need to be widespread panic over that warning for most people. The best evidence that exists on this issue now is reassuring.”

MORE: Statins Have Few Side Effects, But Should More People Be Taking Them?

While the research group did not break down the statins by dose or by type, Martin says their effect on memory, attention and organization is likely similar across different types. It’s possible that statins, which suppress cholesterol formation in the liver, are also inhibiting the formation of vessel-blocking plaques that can squeeze off blood flow to the brain and compromise cognitive functions. That could be critical for maintaining strong nerve networks responsible for memory, concentration and other cognitive skills.

In recent years, researchers have also identified another disease-fighting feature of the medications – their ability to reduce inflammation. That process is responsible for a host of detrimental molecular mechanisms, including damage to blood vessels that can inhibit the blood flow essential to maintaining brain function.

However the medications may be working on the brain, the results hint at the possibility that they may do far more than protect people from heart disease. Martin and his colleagues found hints that long term use of statins may even improve cognitive function; in the current analysis, the trend wasn’t statistically significant, but if additional studies support these results, then statins could become the drug of choice for healthy minds as well as healthy hearts.