Getting diagnosed with type 2 diabetes in your fifties isn’t just a danger to your physical health, says a new study published in the Annals of Internal Medicine. The disease also appears to seriously increase a person’s likelihood of suffering mental decline later in life, The New York Times reports.

For the study, which began in 1990, scientists took a look at 13,351 black and white adults ages 48 to 57. Doctors administered glucose control tests and also evaluated participants’ memory, reasoning, problem-solving and planning capabilities.

At the start of the study, about 13 percent of the adults enrolled had diabetes. Researchers followed these participants for a period of 20 years, of whom 5,987 remained at the end of the study. Scientists found that the diabetes patients suffered a 30 percent larger decline in their cognitive skills over time than those without the disease.

Diabetes is known to affect blood circulation in the body, and the study’s authors suggested that the connection between the disease and dementia could be the result of damaged blood vessels in the brain.

But, said Elizabeth Selvin, MD, PhD, an associate professor of epidemiology at the Johns Hopkins Bloomberg School of Public Health, “Factors like diabetes are potentially modifiable. If we can better control diabetes we can stave off cognitive decline and further dementia.”

Click here for tips on how to help prevent and even reverse type 2 diabetes.