Background: Daily pre-exposure prophylaxis (PrEP) is effective in preventing HIV, but few long-term data are available on effectiveness and adherence in real-world settings. Here, we report trends in HIV incidence over 3 years in individuals at high risk who were prescribed PrEP in New South Wales (NSW), as well as adherence before the transition to subsidised PrEP. Methods: Expanded PrEP Implementation in Communities–New South Wales (EPIC-NSW) was a pragmatic, prospective, single-arm, implementation study of daily, oral PrEP in 31 sites (sexual health clinics, general practices, and a hospital) in NSW, Australia. Eligible participants were HIV-negative adults (aged ≥18 years) who were at high risk of HIV infection as defined in local PrEP guidelines. Participants were prescribed coformulated (once-daily, oral tablet) tenofovir disoproxil fumarate (300 mg) and emtricitabine (200 mg) as HIV PrEP and were followed up with HIV testing, sexually transmitted infection testing, and PrEP dispensing. Originally planned for 3700 participants followed for 1 year, the study was expanded so that all eligible participants in the state could obtain PrEP and extended until publicly subsidised PrEP became available in Australia. The primary outcome was new HIV infection among all participants who were dispensed PrEP at least once and had at least one follow-up HIV test result. Adherence was estimated by medication possession ratio (MPR), defined as the proportion of PrEP pills dispensed in 90 days, assuming daily dosing. This study is registered with ClinicalTrials.gov, NCT02870790. Findings: Between March 1, 2016, and April 30, 2018, we enrolled 9709 participants. 9596 participants were dispensed PrEP, of whom 9448 (98·3%) were gay or bisexual men. Participants were followed up until March 31, 2019, with at least one follow-up HIV test available in 9520 (99·2%) participants. Mean MPR declined from 0·93 to 0·64 from the first to the ninth quarter. There were 30 HIV seroconversions over 18 628 person-years, an incidence of 1·61 per 1000 person-years (95% CI 1·13–2·30). Being younger, living in a postcode with fewer gay men, reporting more risk behaviours at baseline, and having an MPR of less than 0·6 were each univariately associated with increased HIV incidence. In the final year of follow-up, when PrEP was mostly purchased rather than provided free by the study, HIV incidence remained low at 2·24 per 1000 person-years (1·46–3·44). Interpretation: HIV incidence remained low over up to 3 years of follow-up, including during a transition from study-provided to publicly subsidised PrEP. In a setting of affordable PrEP and associated health-care services, very low HIV incidence of 1 to 2 per 1000 person-years can be maintained in gay and bisexual men who were previously at high risk. Funding: New South Wales Ministry of Health, Australian Capital Territory Health Directorate, Gilead Sciences.