Epididymitis, the inflammation of the coiled tube behind each testicle, is most often caused by a bacterial infection that travels backward through the urinary and reproductive tract. The specific bacteria responsible depend largely on your age and sexual activity. In sexually active men under 35, chlamydia is the single most common cause, responsible for up to 50% of cases. In men over 35 and in young boys, ordinary urinary tract bacteria like E. coli are the usual culprits.
Sexually Transmitted Infections
For younger, sexually active men, the most frequent path to epididymitis is a sexually transmitted infection. Chlamydia leads the list, followed by gonorrhea. A third bacterium called Mycoplasma genitalium is also recognized as a cause. These bacteria initially infect the urethra, often without any noticeable symptoms there, and then migrate backward through the vas deferens to reach the epididymis. Because the urethral infection can be silent, many men don’t realize they have an STI until scrotal pain and swelling develop.
Men who are the insertive partner during anal sex can develop epididymitis from gut bacteria like E. coli transmitted during intercourse. This is technically an STI-related cause but involves a different class of bacteria than the typical chlamydia or gonorrhea cases.
Urinary Tract Bacteria
In men older than 35 and in boys younger than 14, the infection usually comes from common urinary tract organisms. E. coli is the most frequent, but other bacteria including Proteus, Klebsiella, and Pseudomonas can be responsible. The infection typically starts in the bladder or prostate and spreads to the epididymis through retrograde flow, meaning bacteria travel backward through the vas deferens rather than following the normal outward path.
This pattern is more common in men with enlarged prostates, urinary retention, or any condition that disrupts normal urine flow. Structural abnormalities in the urinary system can also set the stage, which is why epididymitis in young boys often prompts doctors to look for underlying anatomical problems.
Catheters and Medical Procedures
Urinary catheter use is a well-established risk factor. Men with spinal cord injuries who perform intermittent self-catheterization develop epididymitis at rates between 2% and 28%, depending on the type of catheter used. Low-friction hydrophilic catheters carry a lower risk (around 6%) compared to standard PVC catheters (10% to 29%). The risk climbs further if a urethral stricture is present, since the narrowed urethra creates more opportunity for bacteria to be pushed into the reproductive tract during catheter insertion.
Prostate surgery and other procedures involving the lower urinary tract can also introduce bacteria or create inflammation that leads to epididymitis.
Physical Strain and Chemical Irritation
Not every case involves bacteria. Heavy lifting and intense physical exertion can force urine backward from the bladder into the epididymis through the vas deferens. The urine itself acts as a chemical irritant, triggering inflammation without any infection present. This is sometimes called “chemical epididymitis” or sterile epididymitis, and it can produce the same pain and swelling as the infectious type, though the treatment approach differs.
Causes in Children
In younger boys who are not sexually active, epididymitis is typically caused by a urinary tract infection. When it happens, doctors often investigate whether there’s a structural abnormality in the urinary or genital system that made the infection more likely. In older adolescents, the cause profile shifts to mirror that of sexually active adults, with gonorrhea and chlamydia becoming the primary concerns.
How It Feels
Epididymitis usually develops gradually over a few days rather than striking all at once. Pain typically starts on one side of the scrotum, and you may notice swelling, warmth, and tenderness behind the testicle. Some men also have a low-grade fever, a burning sensation when urinating, or discharge from the urethra, though these symptoms aren’t always present. The gradual onset is one key feature that distinguishes it from testicular torsion, which causes sudden, severe pain and is a surgical emergency.
If pain in the scrotum comes on suddenly and intensely, especially in someone under 25, torsion needs to be ruled out quickly. With epididymitis, the pain often eases slightly when the scrotum is elevated. With torsion, it does not.
Acute vs. Chronic
Most cases are acute, meaning they develop over days and resolve with treatment within a few weeks. Chronic epididymitis is defined as scrotal pain lasting three months or longer. It can follow an acute episode that never fully clears, or it can develop without an obvious triggering infection. Chronic cases are harder to treat and sometimes involve pain management rather than antibiotics, since an active bacterial infection may no longer be present.
Effects on Fertility
One concern many men have is whether epididymitis can affect fertility. Because the epididymis is where sperm mature and are stored, inflammation there can disrupt that process. Research from Justus Liebig University Giessen found that even when standard semen analysis looked normal three months after an episode, the protein composition of sperm was significantly altered. Thirty-five proteins were found at lower levels in sperm from men who had recovered from epididymitis compared to healthy controls. These protein changes could contribute to reduced fertility that wouldn’t be caught by a routine sperm count.
Repeated or severe infections carry a higher risk of scarring that can physically block sperm from passing through the epididymis. Bilateral cases, where both sides are affected, pose the greatest fertility concern.
How It’s Treated
Treatment depends on the suspected cause. If an STI is likely, you’ll receive antibiotics that target chlamydia, gonorrhea, or both. If urinary tract bacteria are the probable source, a different class of antibiotics is prescribed. In either case, a course of antibiotics typically lasts 10 to 14 days, and symptoms usually begin improving within a few days of starting treatment, though full resolution can take several weeks.
Supportive measures make a real difference in comfort during recovery. Scrotal elevation with supportive underwear, ice packs, and over-the-counter anti-inflammatory medications all help with pain and swelling. Sexual partners should be notified and treated if an STI is identified, and you should avoid sexual contact until treatment is complete and symptoms have resolved.
For chemical epididymitis caused by physical strain, antibiotics aren’t effective. Treatment focuses on rest, anti-inflammatory medication, and avoiding the activity that triggered the episode.