(CNN) Many older adults know that long-term use of certain medications can negatively affect cognition and increase one's risk of dementia.

But a new study suggests that some classes of anticholinergic drugs -- particularly those used to treat depression, Parkinson's and urinary incontinence -- carry a higher risk than others.

Anticholinergic drugs function by blocking the effects of acetylcholine, a chemical released by nerve cells to send signals to other nerves and muscles. They are prescribed to 20% to 50% of older adults in the United States to treat a variety of neurological, psychiatric, gastrointestinal, respiratory and muscular conditions, according to a 2009 study . In the UK, 34% to 48% of older adults take them, another study found.

The new study, published Wednesday in the British Medical Journal , looked at the risk of new-onset dementia among nearly 350,000 older adults in the United Kingdom. The researchers found that people who used certain types of anticholinergics, such as those used to treat depression, Parkinson's and urinary incontinence, for a year or more had about a 30% increased risk of developing dementia down the road.

But those individuals taking other classes of anticholinergics -- including those used for asthma and gastrointestinal issues -- were not at an increased risk of developing dementia compared with matched controls, the study found.

"Previous studies had really only said that anticholinergics were associated with dementia incidence," said George Savva , researcher of health sciences at the University of East Anglia and a lead author on the study, in a news briefing. "But we broke it down by class, which is where our study really has its novelty and power."

The study relied on data from from the UK's Clinical Practice Research Database to identify 40,770 patients aged 65 to 99 who were diagnosed with dementia between April 2006 and July 2015. Researchers compared how many daily doses of anticholinergic drugs these patients had been prescribed between four and 20 years earlier with a control group of almost 300,000 matched individuals.

"In total, there were 27 million prescription events that we were looking at over that period," Savva said. "And we found that about 9% of our (dementia) cases had taken anticholinergics in the past, compared to about 6% of our controls."

This means those patients with a new dementia diagnosis had significantly more exposure to anticholinergic medications during the study period than those without dementia, according to Savva.

Specifically, those anticholinergics used for depression (e.g. amitriptyline), urinary incontinence (e.g. oxybutynin) and Parkinson's disease (e.g. procyclidine) were associated with around a 30% increased risk of developing dementia.

Thus, if someone had a baseline 10% risk of developing dementia in any given year, that risk would increase to 13% with the long-term use of these anticholinergic medications, according to Savva.

"For the urological and antidepressants, there's quite a clear association between their long-term use and dementia incidence ... (and) for anti-Parkinson's medications, the risk is there, but there's far fewer of those prescriptions in the database, so there's a lot less certainty," Savva said.

"But it's difficult to generalize across patients, and it's difficult to talk about an individual because this is a population average risk and it depends very much on the patient," he added.

Though the 30% increased risk of developing dementia from long-term anticholinergic use is significant, it is still less than the risk associated with other modifiable risk factors for dementia such as smoking, social isolation and physical inactivity. These lifestyle factors are associated with a 40% to 60% increased risk of developing dementia, according to a 2017 study

The exact reasons for the increased risk of dementia among those taking certain anticholinergic medications remain unclear. Levels of acetylcholine are known to be significantly lower in people with Alzheimer's disease, the most common cause of dementia in older adults, according to the Mayo Clinic . Therefore, some anticholinergic drugs may block the normal activity of acetylcholine in regions of the brain associated with memory and cognition, resulting in Alzheimer's-like symptoms, according to Savva.

"There is also some animal evidence that anticholinergics may affect neuroinflammation," he said. "So one presumed route is that it may set up an inflammatory cascade, which then leads to tau and amyloid deposition."

Tau and amyloid are proteins found in increased levels in the brains of many dementia patients, particularly those with Alzheimer's, according to the National Institute on Aging

The new study is among the largest of its kind and adds to the existing literature linking long-term anticholinergic use with dementia, according to Dr. Clive Ballard , executive dean of University of Exeter Medical School, who was not involved in the research. A 2015 study, for example, showed a 54% increased risk of dementia among individuals prescribed high levels of anticholinergics over a 10-year period, compared with a control group.

But the new study is the first to look at different classes of anticholinergic medications, according to Savva. This allowed the researchers to show that some types of anticholinergic medications were not associated with the onset of dementia.

"Of particular interest to us is the classes where there is no association. Previously, antihistamines have been implicated (in dementia risk), but we've not found any association between those specifically and dementia, as well as the gastrointestinal drugs," Savva said.

The study was observational in nature, making it difficult to draw definitive conclusions about causality, according to Dr. Martin Rossor , professor or clinical neurology at University College London, who was not involved in the research.

"It is important to be cautious about associations, as they do not prove causation," Rossor said. "For example, depression is common before the onset of dementia, and so those individuals receiving an antidepressant drug with anticholinergic effects may already have a disease such as Alzheimer's disease that will lead to dementia 10 years later."

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

But particularly as treatment options for many conditions increase, the study adds more weight to the notion that physicians should be proactive about identifying alternatives to anticholinergic medications whenever possible, according to Dr. Chris Fox , a clinical senior lecturer at Norwich Medical School and a lead author on the study.

"When I see patients on these drugs, I now say, 'let's think about other alternatives,' " Fox said. "The medicines are good. They have expanded lifespan, et cetera. But sometimes, it takes years for the harms to come out."

The researchers also caution that patients should always consult with their physicians before changing any medication regimen.

"Many medicines have this activity, and I think the key things from our finding is that it probably shifts the balance looking at risks versus benefits," said Ian Maidment , senior lecturer in clinical pharmacy at Aston University and another author on the study.

"But patients, don't suddenly stop medications. Carry on as usual, and if you're concerned, talk to your doctor or pharmacist."