Uncomfortable, throbbing migraine headaches can be triggered by many factors, such as hormonal changes, certain foods and drinks, stress, and exercise, according to the Mayo Clinic. In a new study published in the journal mSystems, higher levels of gut bacteria have now been added to the list of potential causes.

People who suffer from these debilitating headaches may actually have an abnormality in the stomach that causes them. A unique mix of gut bacteria could actually increase sensitivity to certain foods containing nitrates, according to the study. It’s possible that, when food is being broken down more effectively by the gut bacteria, these nitrates cause vessels in the brain and scalp to dilate, which results in a migraine.

These types of nitrates are typically found in processed meats, leafy vegetables, and some wines. Research showed that migraine sufferers had higher levels of certain bacteria known to be involved in processing these foods.

This study involved researchers examining healthy participants’ bacteria in the form of 172 oral samples and 1,996 fecal samples, according to The Guardian. Prior, participants had all reported whether they were affected by migraines.

These results could help explain why some people are more susceptible to migraines, which affect three times as many women as men.

“There is this idea out there that certain foods trigger migraines — chocolate, wine and especially foods containing nitrates. We thought that perhaps there are connections between what people are eating, their microbiomes and their experiences with migraines,” Antonio Gonzalez, the study’s first author, told The Guardian.

According to researchers, it might be possible to “have a magical probiotic mouthwash” in the future. This mythical product would shift the balance of gut bacteria, ultimately helping prevent migraines.

Source: Gonzalez A, Hyde E, Sangwan N, Gilbert JA, Viirre E, Knight R. Migraines Are Correlated with Higher Levels of Nitrate-, Nitrite-, and Nitric Oxide-Reducing Oral Microbes in the American Gut Project Cohort. mSystems. 2016.

Read more:

Migraine Awareness: Why Migraines Largely Remain A Mystery

Food For Thought: Gut Bacteria May Influence How The Mind Works, Affecting Mood And Behavior