Erectile dysfunction affects more than 18 million men in the United States, the Johns Hopkins Bloomberg School of Public Health reported; and perhaps unsurprisingly most of whom are middle aged and elderly. But age might not have to be such a threat to an active sex life if men ate more blueberries. A new study, published in The American Journal of Clinical Nutrition, has found a diet high in foods containing the powerful plant nutrient flavonoids can lower the risk of erectile dysfunction in men as they age.

For the study, researchers had 25,096 men report their dietary patterns every four years: 2000, 2004, and 2008. During those follow-up periods, participants also self-rated their erectile dysfunction. Researchers found a distinct pattern among men who had lower rates of erectile dysfunction, and it was that they ate more flavonoid-rich foods. Men who regularly ate foods richest in flavonoids — blueberries, strawberries, apples, pears, oranges, and grapefruit — as well as drank red wine reaped the most benefits.

Researchers calculated how many flavonoids were in each food source before scoring each person on their intake. Those who ate the most had a 14 percent lower risk of developing erectile dysfunction compared to those who ate the least amount of fortifying-food sources. How do certain types of nutrients benefit sexual function? Flavonoids aren't just any type of nutrient — they're potent phytonutrients.

Flavonoids called anthocyanins, a type of antioxidant, give fruits their blue, purple, or deep red pigment, signaling they're packed with antioxidants and anti-inflammatory properties. This helps to relax blood vessels and support healthy blood flow, which is what the penis needs to become erect (and stay erect) during sexual engagement. Some studies have shown anthocyanins may help protect you from developing chronic conditions, such as cancer and cardiovascular disease, thanks to its ability to produce healthy blood flow.

Blackberries are believed to have the highest levels of antioxidants compared to every other fruit.

Another type of flavonoids, called flavonols, was measured in the study and has demonstrated antioxidant capacities similar to anthocyanins. They're particularly beneficial to those who need help lowering cholesterol and decreasing plaque in arteries. Nearly 90 percent of men with erectile dysfunction also have at least one risk factor for heart disease, which includes diabetes, hypertension, and poor cholesterol levels.

Now that these new findings reveal flavonoids' ability to decrease the risk of developing erectile dysfunction, it may become a dietary recommendation for young men or those currently suffering from the condition. According to the Mayo Clinic, the most common causes of erectile dysfunction include heart disease, clogged blood vessels, high cholesterol, high blood pressure, and diabetes, Experts also find obesity, depression, anxiety, and stress can potentially play a part.

While erectile dysfunction may be caused by a multifaceted set of circumstances that involve a combination of physical and psychological issues, a healthy diet can skim off a bit of the risk.

Source: Rimm EB, Cassidy A, and Franz M. Dietary flavonoid intake and incidence of erectile dysfunction. The American Journal of Clinical Nutrition. 2016.