What STD Causes Testicular Pain and How to Treat It

The STI most likely to make your testicles hurt is chlamydia, followed closely by gonorrhea. These infections cause pain not by attacking the testicle directly, but by triggering a condition called epididymitis, an inflammation of the coiled tube (the epididymis) that sits behind each testicle and carries sperm. A third bacterium, Mycoplasma genitalium, can do the same thing but is less common.

How an STI Leads to Testicular Pain

Bacteria from chlamydia or gonorrhea typically start as a urethral infection, often with no symptoms at all. From there, the bacteria travel backward, moving up through the reproductive tract until they reach the epididymis. This retrograde path from the urethra to the scrotum is the standard route for STI-related testicular pain. Once the bacteria settle into the epididymis, your immune system mounts an inflammatory response, and that’s what produces the swelling, tenderness, and ache.

Because the infection usually begins in the urethra, you may also notice a discharge from the penis or a burning sensation when you urinate. But many people with chlamydia or gonorrhea have no urethral symptoms at all, which means testicular pain can sometimes be the first and only sign something is wrong.

What It Feels Like

STI-related testicular pain typically builds gradually over a few days. It usually starts on one side, often at the back of the testicle where the epididymis sits. The affected side may feel swollen, warm, or heavier than normal. You might also notice mild pain that radiates into your lower abdomen or groin. Some people develop a low-grade fever.

This gradual onset is an important detail. Testicular torsion, a different and more dangerous condition where the testicle twists on its blood supply, causes sudden, severe pain that comes on in seconds or minutes, often with nausea or vomiting. If your pain hit hard and fast, that’s a medical emergency. Get to an ER immediately, because torsion can permanently damage the testicle within hours.

How It’s Diagnosed

If you go to a clinic with testicular pain, the standard workup includes a urine test. For STI detection, first-catch urine (the initial stream, not midstream) is run through a nucleic acid amplification test, or NAAT, which is the most sensitive method available for detecting chlamydia and gonorrhea. A urethral swab can also be used, and recent studies show that self-collected swabs from the tip of the penis perform just as well as provider-collected samples or urine.

A physical exam helps distinguish epididymitis from torsion or other causes. Your provider will also likely check for discharge and may order additional tests to rule out a urinary tract infection, since gut bacteria like E. coli can cause the same type of inflammation, especially in men over 35 or those who have anal sex.

Treatment and Recovery

STI-related epididymitis is treated with antibiotics, and the specific combination depends on which bacteria are suspected or confirmed. Treatment is typically started right away, before test results come back, because waiting increases the risk of complications. Most people start feeling better within a few days of starting antibiotics, though the swelling can take a couple of weeks to fully resolve.

While you’re recovering, supportive care makes a real difference. Over-the-counter anti-inflammatory medication, scrotal support (like snug underwear), and ice packs can all help with the pain and swelling. You should avoid sex until you’ve completed treatment and your partner has been tested and treated as well, since reinfection is common and will land you right back where you started.

What Happens If You Don’t Treat It

Left untreated, the infection can cause real damage. The inflammatory response creates scar tissue inside the epididymis, and because sperm have to travel through this tube to leave the body, scarring can block that path entirely. This is called obstructive azoospermia, a condition where the body still produces sperm but they can’t get out. It’s one of the recognized causes of male infertility linked to STIs.

Beyond fertility, untreated infections can also lead to chronic testicular pain that persists long after the original bacteria are gone, scarring of the urethra (urethral stricture), and in severe cases, an abscess in the scrotum that requires surgical drainage. Chlamydia is particularly associated with these long-term complications because it so often goes undiagnosed in its early stages.

Other STIs and Testicular Pain

Chlamydia, gonorrhea, and Mycoplasma genitalium are the primary STIs that cause testicular pain. Syphilis, herpes, and HIV do not typically cause this symptom. Mumps, which isn’t an STI, is another well-known cause of testicular inflammation (orchitis), though widespread vaccination has made this uncommon.

If your testicular pain doesn’t line up with an STI, other possibilities include a varicocele (swollen veins in the scrotum), an inguinal hernia, kidney stones referring pain downward, or simple trauma. But if you’re sexually active and the pain came on gradually with any hint of urinary symptoms, an STI screen should be your first step.