Foods high in fat and sugar have long been known to put a person at an increased risk of obesity, diabetes and cardiovascular disorders. Adding to this list of effects, researchers indicated in a new study at Oregon State University that such foods may also result in cognitive declines.

The researchers suggested in a study published by the Journal of Neuroscience that foods rich in fat and sugar have a tendency to alter the biome in the gut of the human body. The altered bacterial changes in the body can lead to loss of cognitive function in an individual.

In addition, the researchers discovered during the study that this effect was more pronounced in the case of foods high in sugar than it was in the case of foods high in fat. It was found to cause early learning disabilities related to short-term and long-term memories.

“This work suggests that fat and sugar are altering your healthy bacterial systems, and that’s one of the reasons those foods aren’t good for you,” Kathy R. Magnusson, a professor of embryology and microanatomy at Oregon State, said in a statement. “It’s not just the food that could be influencing your brain, but an interaction between the food and microbial changes.”

During the experimental stage, the researchers fed mice different diets, encompassing one rich in fat and sugar. At the end of four weeks, the researchers could discern differences in the mental and physical functions of the mice through the use of multiple tests, including a water maze test.

The researchers observed the mice fed foods rich in fat and sugar had bigger declines in mental and physical functions than did the mice fed foods on a so-called normal diet. Most important, the mice consuming a lot of fat and sugar showed a decline in mental flexibility, meaning they were unable to adjust to new tests as well as the mice consuming so-called normal diet foods.