Bisphosphonate (BP) therapy has been associated with atypical femur fracture (AFF). However, the threshold of treatment duration leading to increased AFF risk is unclear. In a retrospective cohort of older women initiating BP, we compared the AFF risk associated with treatment for at least three years to the risk associated with treatment less than three years. We used observational data from a large population of female members of an integrated healthcare system who initiated oral BP during 2002-2014. Women were retrospectively followed for incident AFF confirmed by radiologic adjudication. Demographic data, pharmacologic exposures, comorbidity, bone density, and fracture history were ascertained from electronic health records. Inverse probability weighting was used to estimate risk differences comparing the cumulative incidence (risk) of AFF if women discontinued BP within three years to the cumulative incidence of AFF if women continued BP for three or more years, adjusting for potential time-dependent confounding by the aforementioned factors. Among 87,820 women age 45-84 years who initiated BP (mean age 68.6, median T-score - 2.6, 14% with prior major osteoporotic fracture), 16,180 continued BP for three or more years. Forty-six confirmed AFFs occurred during follow-up in the two groups. AFF-free survival was greater for BP treatment < 3 years compared to treatment ≥3 years (p = 0.004 comparing areas under survival curves). At five years, the risk of AFF was 27 per 100,000 (95% confidence interval, CI: 8-46) if women received BP treatment < 3 years and 120 per 100,000 (95% CI: 56-183) if women received BP treatment ≥3 years (risk difference 93 per 100,000, 95% CI: 30-160). By ten years, the risks were 27 (95% CI: 8-46) and 363 (95% CI: 132-593) per 100,000 for BP treatment < 3 and ≥ 3 years, respectively (risk difference 336 per 100,000, 95% CI: 110-570). Bisphosphonate treatment for 3 or more years was associated with greater risk of AFF than treatment for less than 3 years. Although AFFs are uncommon among BP-treated women, this increased risk should be considered when counseling women about long-term BP use. Future studies should further characterize the dose-response relationship between BP duration and incident AFF and identify patients at highest risk.