Reducing testosterone levels with androgen deprivation therapy, or A.D.T., is a common treatment for prostate cancer. But a new study has found that it more than doubles the risk of dementia.

Previous studies have linked the hormone treatment to an increased risk of depression and Alzheimer’s disease. This new study considered all types of dementia.

Researchers reviewed the medical records of 9,272 men diagnosed with prostate cancer between 1994 and 2013 and who had no previous diagnosis of dementia. They found that the absolute increased risk of dementia after five years was 7.9 percent among those who had been given hormone treatment compared with 3.5 percent among those who had not. Patients who had been receiving A.D.T. for a year or more had the highest increased risk.

The study, in JAMA Oncology, adjusted for smoking, diabetes, cardiovascular disease, cancer and other factors.