An increasing number of countries are currently implementing or scaling-up HIV pre-exposure prophylaxis (PrEP) care. With the introduction of PrEP, there was apprehension that condom use would decline and sexually transmitted infections (STIs) would increase. To inform sexual health counselling and STI screening programmes, we aimed to study sexual behaviour and STI incidence among men who have sex with men (MSM) and transgender women who use long-term daily or event-driven PrEP. The Amsterdam PrEP demonstration project (AMPrEP) was a prospective, closed cohort study, providing oral daily PrEP and event-driven PrEP to MSM and transgender women from 2015 to 2020. Participants could choose their PrEP regimen and could switch at each three-monthly visit. STI testing occurred at and, upon request, in-between 3-monthly study visits. We assessed changes in numbers of sex partners and condomless anal sex (CAS) acts with casual partners over time using negative binomial regression, adjusted for age. We assessed HIV incidence and changes in incidence rates (IRs) of any STI (i.e., chlamydia, gonorrhoea, or infectious syphilis) and individual STIs over time using Poisson regression, adjusted for age and testing frequency. A total of 367 participants (365 MSM) commenced PrEP and were followed for a median 3.9 years (interquartile range [IQR] = 3.4-4.0). Median age was 40 years (IQR = 32-48), 315 participants (85.8%) self-declared ethnicity as white and 280 (76.3%) had a university or university of applied sciences degree. Overall median number of sex partners (past 3 months) was 13 (IQR = 6-26) and decreased per additional year on PrEP (adjusted rate ratio [aRR] = 0.86/year, 95% confidence interval [CI] = 0.83-0.88). Overall median number of CAS acts with casual partners (past 3 months) was 10 (IQR = 3-20.5) and also decreased (aRR = 0.92/year, 95% CI = 0.88-0.97). We diagnosed any STI in 1,092 consultations during 1,258 person years, resulting in an IR of 87/100 person years (95% CI = 82-92). IRs of any STI did not increase over time for daily PrEP or event-driven PrEP users. Two daily PrEP users, and no event-driven PrEP users, were diagnosed with HIV during their first year on PrEP. Study limitations include censoring follow-up due to COVID-19 measures and an underrepresentation of younger, non-white, practically educated, and transgender individuals. In this prospective cohort with a comparatively long follow-up period of 4 years, we observed very low HIV incidence and decreases in the numbers of casual sex partners and CAS acts over time. Although the STI incidence was high, it did not increase over time. The study was registered at the Netherlands Trial Register (NL5413) https://www.onderzoekmetmensen.nl/en/trial/22706.