Healthcare encounters for the diagnosis and treatment of sexually transmitted infections (STIs) are common and represent an opportunity to discuss and initiate HIV pre-exposure prophylaxis (PrEP). Little is known about how frequently PrEP is discussed and initiated in association with encounters for STIs. Retrospective cohort and nested case-control study, matched by STI date, in national Veterans HealthAdministration (VHA) facilities from January 2013 to December 2018. Veterans with a first STI diagnosis (i.e., early syphilis, gonorrhea, or chlamydia) based on ICD codes, excluding those with prior HIV diagnosis, prior PrEP use, or STI diagnosed on screening during a visit to initiate PrEP. Frequency of PrEP initiation within 90 days of healthcare encounter for STIs. In the case-control study, we performed a structured chart review from the initial STI-related clinical encounter and quantified frequency of PrEP discussions among matched patients who did and did not initiate PrEP in the following 90 days. We identified 23,312 patients with a first STI, of whom 90 (0.4%) started PrEP within 90 days. PrEP initiation was associated with urban residence (OR = 5.0, 95% CI 1.8-13.5), White compared to Black race (OR = 1.7, 95% CI 1.0-2.7), and syphilis diagnosis (OR = 5.7, 95% CI 3.7-8.6). Chart review revealed that discussion of PrEP was rare among people with STIs who did not subsequently start PrEP (1.1%, 95% CI 0.1-4.0). PrEP initiation was associated with documentation of sexual history (80.0% of initiators vs. 51.0% of non-initiators, p < 0.01) and discussion of PrEP (52.2% vs. 1.1%, p < 0.01) during the initial STI diagnosis encounter. Discussion and initiation of PrEP were rare following healthcare encounters for STIs. Interventions are needed to improve low rates of sexual history-taking and discussion of PrEP during healthcare encounters for STIs.