Erectile dysfunction (ED) is a condition in which you can’t get or maintain an erection hard enough for penetration or orgasm, even when you’re interested in sex. Medical problems or psychological difficulties can cause ED, and the causes are often a mixture of both. ED is treatable regardless of the cause.

You get an erection when the arteries that bring blood to the penis swell and press the veins closed. The veins normally allow the blood to leave the penis. This causes the blood to be held back. A combination of blood held back and erectile tissue makes the penis hard. ED typically occurs when there’s not enough blood flow to the penis.

A 2011 study speculated that if inflammation causes ED, then aspirin or nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen could prevent ED. The study concluded that anti-inflammatory drugs seemed to cause ED. The study also reported that those who use aspirin and NSAIDs are 20 percent more likely to have ED.

However, it’s important to note that the study didn’t take into consideration the number of patients who used aspirin and also had a specific diagnosis of coronary artery disease or peripheral vascular disease. For those patients in the study, ED could have been caused by heart and vascular problems rather than the aspirin they were taking for those conditions. Additionally, there are no other studies that indicate aspirin can cause ED.

Although there is little evidence pointing to a connection between aspirin and ED, there are causes of ED that are established. The following medical issues can play a role in ED:

You’re at greater risk for ED if you smoke tobacco, have more than two alcoholic drinks per day, or are overweight. According to the National Institutes of Health (NIH), about 12 percent of men younger than 60 years experience ED. That number increases to 22 percent of men aged 60–69 years and 30 percent of men aged 70 years and older.

Some labels on aspirin bottles list ED as a possible side effect, but evidence from studies regarding this link is not clear. What is clear is that ED is something you don’t have to live with.

Talk with your doctor if you have experienced ED. Let your doctor know if you take aspirin regularly. If your health permits, your doctor may recommend that you stop taking it for a period of time to see if your ED improves. Your doctor may also recommend certain lifestyle changes to help, such as drinking less alcohol, cutting out tobacco, and getting more exercise. If that still doesn’t do the trick, your doctor may recommend one of many medications to treat your ED.