Find your perfect match

We'll match you with the perfect product to maximize pleasure, performance and satisfaction

Let's do this!

Can Sexually Transmitted Infections (STDs/STIs) Cause ED? Here's What You Need to Know

10 min read
Can Sexually Transmitted Infections (STDs/STIs) Cause ED? Here's What You Need to Know

While many of the health issues that contribute to erectile dysfunction (ED) are commonly known, the links between sexually transmitted infections (STIs) or sexually transmitted diseases (STDs) and ED are less well-known.

While some STIs and STDs can contribute to sexual dysfunction directly by causing symptoms within the penis that prevent proper erectile function - they more commonly affect ED indirectly by causing symptoms elsewhere in the male reproductive system that can then result in ED symptoms.

Here, we'll take a detailed look at the different ways STDs/STIs can contribute to erectile dysfunction, the effects that the most common STIs can have on ED, the impact of STIs on prostate health, and some simple steps to take if you think you might have an STI or STD.

Why can some STIs cause ED?

According to Johns Hopkins Medicine, erectile dysfunction is "the persistent inability to achieve or maintain penile erection sufficient for satisfactory sexual performance" - and there's a combination of psychological, neurological, hormonal, and vascular factors that can create that inability.

Sexually transmitted infections (STIs) can contribute to erectile dysfunction in a number of ways, including:

  • by causing inflammation in the genital region,
  • damaging nerves and blood vessels in the genitals, and;
  • damaging a person's psychological well-being and feelings about sexual intercourse

    While we typically think of the penis and testicles as being the most important parts of the body for sexual function, the biological picture is actually more complex. Healthy functioning of the male accessory glands is also a key part of male sexual health, as these glands have important roles that aid proper sexual function. As such, any issue or infection within these less-obvious areas can cause problems that then lead to erectile dysfunction.

    STIs, The male accessory glands, and ED

    Many symptoms of STIs or STDs do not directly affect the function of the penis - but instead cause problems elsewhere in the body, which can then affect the function of the penis. In medical terms, this makes them "indirect risk factors" or "secondary risk factors".

    Despite not affecting the penis directly, these indirect risk factors are no less important when it comes to erectile dysfunction.

    The most significant indirect risk factors linking a sexually transmitted infection and ED are symptoms that affect the male accessory glands we've discussed above - parts of the male reproductive system that play crucial roles in overall male reproductive health and sexual function. In terms of ED, an STI will often spread, causing male accessory gland infections (MAGIs), which can then cause erectile dysfunction.


    Diagram of the Male Accessory Glands

    Image Source: EduRev (The Male Reproductive System)

    Common MAGIs and the areas they impact

    To get a full understanding of how this common kind of erectile dysfunction chain reaction happens, it's useful to take a look at the key parts of the reproductive system and how STIs and STDs can cause MAGIs, resulting in ED.

    Prostatitis - affecting the prostate gland

    The prostate gland is an important part of the reproductive system in men. It produces a fluid that forms part of semen, as well as stimulating the muscles that forcefully eject semen from the penis. A 2010 study showed that STIs and STDs can infect the prostate, leading to prostatitis - an inflammation of the gland.

    This inflammation can cause swelling, discomfort, and pain - disrupting the production of prostate fluid.

    The inflammation from prostatitis can also affect nerve function and can constrain the blood flow into the penis - therefore causing erectile dysfunction. What's more, the discomfort in the genital region caused by prostatitis can also damage psychological well-being, limiting sexual arousal - again impacting a person's ability to perform sexually.

    Seminal Vesiculitis - affecting the seminal vesicles

    The seminal vesicles are tiny glands that produce a significant portion of semen - creating a fluid that's rich in nutrients required for sperm to survive and move effectively.

    According to a 2006 study - STDs and STIs can cause inflammation in these glands, disrupting their normal function and preventing them from producing seminal fluid. This inflammation can also cause pain, especially as the penis becomes erect and during ejaculation. Pain in the genitals can trigger the body's stress response, diverting blood flow away from the penis, reducing the chance of a successful erection.

    Pain in the genitals can also cause significant psychological stress, making a person far less likely to engage in sexual behavior - and therefore also potentially limiting the arousal needed to achieve and maintain an erection.

    Epididymitis - affecting the epididymis

    The epididymis a coiled tube located at the back of each testicle. They store sperm - allowing the tiny cells to mature so they have the mobility needed to fertilize and egg after ejaculation.

    This neurological response can quickly divert blood away from the penis, potentially resulting in ED.

    If an STI or STD infects these tight tubes, it can cause significant pain, swelling, and discomfort - a condition called epididymitis. This kind of discomfort can make any kind of sexual contact result in intense tesicle and penis pain, so even the touch of a sexual partner or movement that comes from penetration can trigger the nervous system's pain response. This neurological response can quickly divert blood away from the penis, potentially resulting in ED.

    Bulbourethral Gland Infection - affecting the bulbourethral glands (Cowper's glands)

    Located below the prostate gland at the base of the penis, the bulbourethral glands (also known as Cowper's glands) produce another part of the seminal fluid that aids the sperm's journey toward an egg and protects the cells after they leave the penis.

    Again, bacterial infections like STIs can create inflammation in the Cowper's glands. As well as the swelling and discomfort relating to this kind of inflammation, the glands can also become blocked, creating a burning sensation as the body tries to produce and secrete seminal fluid. This pain is likely to reduce the person's desire to be sexually active - and inflammation can compress blood vessels around the base of the penis, limiting the blood flow and potentially causing erectile dysfunction.

    Which STIs and STDs can cause erectile dysfunction?

    Although the figures change slightly year-to-year, the CDC generally estimates that around 20% of the population of the U.S. has an STI at any given time - that's around 68 million infections.

    Illustration of the STI Prevalence, Incidence, and Cost Estimates in the United States

    Photo Credit: Centers for Disease Control and Prevention

    Since chlamydia, gonorrhea, and Human Papillomavirus (HPV) are the most common STIs in the U.S., we'll take a look at them here in more detail:

    Chlamydia and ED

    Chlamydia is a common sexually transmitted disease caused by the bacterium Chlamydia trachomatis. It can infect both men and women and is easily transmitted during sexual contact. Chlamydia is the most frequently reported bacterial STI in the U.S., with around 4 million people contracting the infection in a typical year.


    Many people with chlamydia do not experience symptoms, making it a "silent" infection. When symptoms do occur, they may include painful urination, genital discharge, and pain and swelling in one or both testicles, potentially affecting erectile function indirectly through discomfort and pain.

    Chlamydia is known to cause a range of health issues in men - including prostatitis, seminal vesiculitis, epididymitis, and bulbourethral gland infections.

    Treatment and prevention

    Chlamydia is treatable with a course of antibiotics. Measures to prevent contracting chlamydia include using condoms during sexual activity, regular STI screening (particularly for sexually active individuals with new or multiple partners), and engaging in mutual monogamy - where both partners are tested and known to be uninfected.

    Gonorrhea and ED

    Gonorrhea is a sexually transmitted bacterial infection caused by the bacterium Neisseria gonorrhoeae. It affects both men and women and can lead to serious health problems if not treated. Gonorrhea is very common - especially among people aged 15-24.


    Symptoms of gonorrhea include a burning sensation when urinating, a white, yellow, or green discharge from the penis, and painful or swollen testicles, which can indirectly impact erectile function due to compressing of blood vessels and nerves.

    Additionally, it can cause discomfort and pain that affect sexual performance and desire.

    Gonorrhea is also linked to a range of male health issues, including prostatitis, seminal vesiculitis, epididymitis, and bulbourethral gland infections.

    Treatment and prevention

    Gonorrhea is treatable with a specific antibiotic regimen, as recommended by healthcare providers, given the rising concern of antibiotic-resistant strains. Prevention strategies include safe sex (consistent condom use), regular STI testing, and ensuring all sexual partners are treated to prevent reinfection.

    HPV and ED

    HPV is the most common sexually transmitted viral infection, with many types affecting different parts of the body, including the genitals, mouth, and throat.


    HPV often causes no symptoms. However, certain strains can cause genital warts, while others may lead to cancer. Although HPV isn't directly linked to the MAGIs listed above, the presence of genital warts can be psychologically distressing and affect sexual confidence, indirectly influencing erectile function.

    Treatment and prevention

    There's no cure for HPV, but its effects can be managed. Treatments are available for conditions caused by HPV, like genital warts and cancers. Recent years have seen an effective preventive HPV vaccine developed, and is recommended for children to reduce the risk of infection later in life. For adults, safe sex practices and regular screenings can help manage risk and detect any potential complications early.

    Other STI Effects on the Prostate

    The Anatomical Position of the Prostate

    Diagram of The Anatomical Position of the Prostate

     Image Source: TeachMeAnatomy

    Although we've already talked about what can happen if an STI leads to prostatitis, this is just one of many effects STIs and STDs can have on the prostate gland. The prostate is susceptible to various STI-induced conditions, including:

    Asymptomatic Inflammatory Prostatitis

    Some STIs, even when not causing obvious prostate symptoms, can lead to a condition known as 'asymptomatic inflammatory prostatitis'. With this condition, inflammation is present without the usual symptoms of pain or discomfort, potentially affecting semen quality and ejaculation. This can indirectly damage erectile function due to reduced sexual satisfaction or psychological stress about performance.

    Chronic Pelvic Pain Syndrome (CPPS)

    Linked to chronic prostatitis, CPPS can be triggered by STIs. It presents as persistent pain in the pelvic region, significantly impacting a person's quality of life and limiting their sexual function. The discomfort and psychological impact of CPPS can hinder sexual arousal and performance, contributing to ED.

    Prostate Calcification

    Some infections can lead to 'calcifications' or prostate stones within the prostate - which are associated with chronic inflammation. These calcifications may not directly cause ED but can add to other prostatitis symptoms, affecting ejaculation and sexual comfort. As with other conditions on this list, the pain and discomfort associated with calcification can limit a person's sexual desire and make sexual encounters painful - potentially leading to erectile dysfunction.

    What to do if you think you have an STI - step-by-step

    The impact on your ability to get an erection probably isn't your number one concern if you suspect you have an STI or STD - but since many of these infections can be largely symptomless, developing ED might be a sign you've contracted an STI.

    Suspecting you might have an STI can be stressful, but taking prompt and appropriate action is crucial for your health and well-being.

    If you suspect you could have an STI, even if it feels unlikely, you should take the following steps:

    Don’t panic Remember, most of the common STIs are curable  and those not curable can usually be controlled effectively. Early treatment can prevent any complications further down the line.
    Stop any sexual activity To prevent spreading any potential infection, it's important to stop engaging in sexual activity until you've been evaluated and treated. This includes oral sex, mutual masturbation, genital contact, and sharing of sex toys - as well as penetration.
    Schedule a doctor’s appointment Contact your healthcare provider or a local STI clinic to schedule a testing appointment. It's important to be honest with your healthcare provider about your symptoms and full sexual history.
    Get tested Undergo the STI tests recommended by your doctor or specialist. Testing is the only way to effectively detect an STI.
    Inform your sexual partners If you test positive, it's essential that you inform any recent sexual partners so they can also get tested and treated if necessary. This can be difficult, but it's essential for preventing further spread.
    Follow treatment instructions If diagnosed with an STI, you should complete the full course of any prescribed treatment. Do not skip doses or stop early - and don't do anything that might compromise the effectiveness of the medication. If your ED is linked to an STI/STD, treating the condition effectively will also likely treat ED.
    Practice safe sex Unless you're 100% certain that a relationship is monogamous, you should practice safe sex every time - ideally using condoms, the most effective way of preventing STIs.
    Learn about STI prevention Educate yourself on how to prevent STIs in the future. This includes understanding the risks associated with different sexual activities and how to effectively use the right kind of protection.
    Schedule Follow-Up Tests Some STIs require a follow-up test to ensure the infection is fully cleared. Make sure to attend these appointments and be honest about any sexual activity when asked.

    No one likes the idea of being tested for STIs or STDs - but given the potential impact on your sexual function and complications that can arise from not having an infection treated - it's a vitally important part of your overall health and the health of others.

    If you're not comfortable talking to previous sexual partners about the possible spread of an STD, talk to your healthcare provider - some have ways of anonymously sending SMS messages to recommend a previous partner gets tested. Even if the healthcare provider doesn't have an anonymous messaging channel, you can use a free online service, like (only available in the U.S.), to do the same - and it's free of charge.

    Summary: Can STDs Cause ED?

    While sexually transmitted diseases (STDs) and sexually transmitted infections (STIs) rarely directly cause erectile dysfunction, many of the male accessory gland infections (MAGIs) they cause can create problems that directly contribute to ED.

    Of course, erectile dysfunction is just one of the issues that STIs and STDs can potentially cause

    Typically, MAGIs result in inflammation in the genitals and reproductive organs - and this swelling can restrict blood flow to the penis or damage the nerves in the area, both of which can effective proper erectile function. As well as inflammation, MAGIs can cause serious pain, significantly reducing your desire to be sexually active - creating a psychological barrier that can also contribute to ED.

    Of course, erectile dysfunction is just one of the issues that STIs and STDs can potentially cause. Other conditions linked to sexually transmitted diseases include types of cancer, genital warts, infertility, and a series of possible resulting mental health issues - making it absolutely essential that you seek treatment for any infection as quickly as possible.

    The good news is that most STIs and STDs are easily and quickly treatable.

    Not only does this reduce the risk of associated health problems - but it also means any erectile dysfunction symptoms that relate to an STI should quickly disappear, making sex safe and satisfying again.

    Discover how various health factors contribute to Erectile Dysfunction

    How we work to provide accurate and reliable information on the blog

    We put in extensive effort to ensure that each blog post on our site delivers valuable and trustworthy information to our readers. These are our main focus areas:

    • Human writing
    • Exhaustive research and fact-checking
    • Use of Reliable and Reputable Sources
    • Collaboration with Experts
    Learn more about our selection process