To reliably infect a primate model for human immunodeficiency virus (HIV), ~10,000-fold more virus must be delivered vaginally than intravenously. However, the vaginal mechanisms that help protect against HIV are poorly understood. Here, we report that human cervicovaginal mucus (CVM), obtained from donors with normal lactobacillus-dominated vaginal flora, efficiently traps HIV, causing it to diffuse more than 1,000-fold more slowly than it does in water. Lactobacilli acidify CVM to pH ~4 by continuously producing lactic acid. At this acidic pH, we found that lactic acid, but not HCl, abolished the negative surface charge on HIV without lysing the virus membrane. In contrast, in CVM neutralized to pH 6 to 7, as occurs when semen temporarily neutralizes the vagina, HIV maintained its native surface charge and diffused only 15-fold more slowly than it would in water. Thus, methods that can maintain both a high lactic acid content and acidity for CVM during coitus may contribute to both vaginal and penile protection by trapping HIV before it can reach target cells. Our results reveal that CVM likely plays an important but currently unappreciated role in decreasing the rate of HIV sexual transmission.