Pain during sex (dyspareunia) can be caused by several STIs — most commonly pelvic inflammatory disease (PID), genital herpes, and trichomoniasis. It also has many non-STI causes like vaginal dryness, vaginismus, and endometriosis. Because these overlap and several are silent, only a test tells you which one you have.

Pelvic inflammatory disease (PID)
curable

deep pelvic pain and fever (a complication)

Genital herpes
managed

painful blisters that crust over; tends to recur

Trichomoniasis
curable

frothy, itchy discharge with an odor

Pain during sex: likely causes. How the usual suspects tell apart at a glance — the full breakdown is below. Source: CDC.
Pain during sex: likely causes
ItemValue
Pelvic inflammatory disease (PID)curable — deep pelvic pain and fever (a complication)
Genital herpesmanaged — painful blisters that crust over; tends to recur
Trichomoniasiscurable — frothy, itchy discharge with an odor

The short list: what causes painful sex

Painful intercourse splits roughly into two patterns, and the split tells your clinician where to look. Deep pain — the kind felt low in the pelvis with deep thrusting — points toward something inflaming the upper reproductive organs, classically PID. Entry pain — burning or rawness at the vaginal opening or surrounding skin — points toward sores (herpes) or irritation from discharge (trichomoniasis), or a non-infectious cause like dryness or muscle spasm.

These conditions overlap too much to tell apart by sight alone, and several are frequently silent. Guessing from symptoms rarely works. A test is what turns a guess into an answer.

Which STIs cause pain during sex

Pelvic inflammatory disease (PID)

PID is an infection of the upper female reproductive organs — the uterus, fallopian tubes, and ovaries — and it's often a complication of untreated chlamydia and gonorrhea that have traveled up from the cervix CDC — About PID. It's the classic cause of deep pain with sex: as the tubes and surrounding tissue inflame, deep thrusting tugs on tender structures.

Beyond painful sex, PID can bring lower abdominal or pelvic pain, unusual discharge with a bad odor, fever, burning when you urinate, and bleeding between periods or after sex. Symptoms are often mild or absent, so many people don't realize they have it until a fertility problem or chronic pain surfaces. Untreated PID can scar the fallopian tubes, leading to infertility, ectopic pregnancy (a pregnancy that implants outside the uterus), and long-term pelvic pain.

Genital herpes

Genital herpes is caused by two viruses — herpes simplex virus type 1 (HSV-1) and type 2 (HSV-2) CDC — About Genital Herpes. When it causes painful sex, it's usually entry pain: blisters break open into raw sores on or around the genitals, rectum, or mouth, and contact with those sores stings.

A first outbreak tends to be the worst — painful sores that take a week or more to heal, sometimes with flu-like symptoms such as fever, body aches, and swollen glands. Repeat outbreaks are usually shorter and milder, and some people feel a prodrome (a tingling or itching warning before a sore appears). Most people with herpes have no or very mild symptoms, most don't know they have it, and the majority of HSV-2 infections are undiagnosed. An absence of obvious sores doesn't rule it out.

Trichomoniasis

Trichomoniasis ("trich") is caused by the protozoan parasite Trichomonas vaginalis and is the most common curable STI CDC — About Trichomoniasis. It causes painful sex through irritation: inflammation, soreness, and a frothy discharge make the vaginal tissue tender, so intercourse burns.

In women, trich can bring itching, burning, redness or soreness of the genitals, discomfort urinating, and a clear, white, yellowish, or greenish discharge with a fishy smell. In men it may cause itching inside the penis, burning after urinating or ejaculating, and discharge, though men are commonly asymptomatic. Overall, about 70% of infected people have no signs or symptoms at all. When symptoms do appear, they may show up anywhere from 5 to 28 days after infection, but they can appear much later, so timing alone won't tell you when you were exposed.

When painful sex is NOT an STI

Not every case of dyspareunia is an infection. Pain during sex commonly comes from non-STI causes, and these can mimic the symptoms above:

  • Vaginal dryness — too little lubrication makes friction painful at entry and during sex; it's common with hormonal shifts (breastfeeding, menopause, some medications).
  • Vaginismus — an involuntary tightening of the pelvic-floor muscles that makes penetration painful or impossible, often with an anxiety or pain-anticipation component.
  • Endometriosis — tissue like the uterine lining grows outside the uterus, causing deep pelvic pain (including with deep thrusting) and painful periods; it can be mistaken for PID.

How to tell them apart

The discriminating features come down to where the pain is, what else is going on, and what a test shows. Deep pelvic pain with fever or foul discharge leans toward PID; entry pain with visible sores leans toward herpes; entry burning with frothy, fishy discharge leans toward trich; and entry pain with no infection signs (especially with dryness or muscle tension) leans non-STI.

These patterns overlap, and the silent infections won't read off your symptoms at all. That's why you usually can't self-diagnose this. A test settles which one, if any, it is.

CausePain patternTell-tale cluesOften silent?
PIDDeep pelvic painFever, foul discharge, bleeding between periods, lower-abdominal tendernessYes — often mild or absent
Genital herpesEntry / contact painPainful blisters or sores; first outbreak may bring flu-like symptomsYes — most are undiagnosed
TrichomoniasisEntry burningItching, soreness, frothy yellow-green discharge with a fishy smellYes — about 70% have no symptoms
Vaginal drynessEntry friction painLinked to hormones, breastfeeding, menopause, medicationsn/a — not an infection
VaginismusEntry / penetration painInvoluntary muscle tightening; penetration difficult or impossiblen/a — not an infection
EndometriosisDeep pelvic painPainful periods, chronic pelvic pain; can mimic PIDn/a — not an infection

How it's tested

Testing depends on what's suspected: trich is best confirmed with a NAAT (the preferred test) on a vaginal swab or female urine sample; herpes is confirmed by type-specific virologic testing of a sore by NAAT or culture (swab-based tests work best when a lesion is present) CDC — Herpes Testing; and PID is diagnosed clinically rather than by a single confirmatory test. In practice that means a urine sample, a self-collected swab, or a quick exam — often free or low-cost at health departments, Planned Parenthood, and Title X clinics, with results usually back in a few days. You can read the full how-to and accuracy details on trichomoniasis testing & diagnosis, or get tested to start.

Timing matters, too — testing too soon after exposure can miss an early infection. If you're not sure how long to wait, see when to test after exposure.

What to do next

If a test comes back positive, treatment is straightforward and usually fast. Trich is curable with prescription medication, and partners need treatment too so you don't pass it back and forth. Herpes can't be cured, but daily or episodic antiviral medication shortens and reduces outbreaks — see alternative herpes treatments for the options. PID needs prompt antibiotics to protect your fertility; CDC advises a low threshold to begin presumptive treatment when there's pelvic or lower-abdominal pain plus cervical-motion, uterine, or adnexal tenderness with no other cause CDC PID Tx, 2021. The full regimen is covered under pid treatment.

Red flags — when to get seen urgently

Some symptoms shouldn't wait for a routine appointment. Get medical care promptly if you have:

  • Fever or chills with pelvic or lower-abdominal pain.
  • Severe or worsening lower-belly pain, especially on one side.
  • Foul-smelling discharge, heavy bleeding between periods, or bleeding after sex.
  • A possible pregnancy with pelvic pain (an ectopic pregnancy is a medical emergency).
  • Painful sores that are spreading, not healing, or accompanied by trouble urinating.