Mushrooms may benefit mental health, according to new researchled by Penn State College of Medicine.

Penn State researchers used data on diet and mental health collected from more than 24,000 U.S. adults between 2005 and 2016, and found that those who ate mushrooms had lower odds of having depression.

The possible connection: Mushrooms contain ergothioneine, an antioxidant. Previous studies have suggested that antioxidants help prevent several mental illnesses, according to the press release.

“Mushrooms are the highest dietary source of the amino acid ergothioneine—an anti-inflammatory which cannot be synthesized by humans,” said lead researcher Djibril Ba, who recently graduated from the epidemiology doctoral program at the College of Medicine. “Having high levels of this may lower the risk of oxidative stress, which could also reduce the symptoms of depression.”

Looking at specific mushrooms, white button mushrooms contain potassium, which is believed to lower anxiety, the press release states. Plus, other species of edible mushrooms such as Lion’s Mane may stimulate the expression of neurotrophic factors that could help prevent neuropsychiatric disorders, including depression.

The study noted that college-educated, non-Hispanic white women were more likely to eat mushrooms. The average age of surveyed participants was 45; 66% were non-Hispanic white people. The association between mushroom consumption and lower odds of depression held after accounting for socio-demographics, major risk factors, self-reported diseases, medications, and other dietary factors.

Related: 7 Studied Benefits of Medicinal Mushrooms Mental Health: The Next Crisis Research Links Mushrooms with Lowered Cancer Risk

A secondary study was conducted to see if the risk of depression could be lowered by replacing a serving of red or processed meat with a serving of mushrooms each day, but did not find that this move was associated with lower odds of depression.

The study did have limitations: Besides the fact that it’s an observational study, the data also did not provide details on the type of mushrooms, so researchers couldn’t determine the effects of specific mushrooms. Also, food codes issued by the USDA were used to determine mushroom intake, leaving room for inaccurate recording or misclassification.