Objectives To determine the skeletal safety and efficacy of long term (≥10 years) alendronate use in patients with osteoporosis.Design Open register based cohort study containing two nested case control studies.Setting Nationwide study of population of Denmark.Participants 61 990 men and women aged 50-94 at the start of treatment, who had not previously taken alendronate, 1996-2007.Interventions Treatment with alendronate.Main outcome measures Incident fracture of the subtrochanteric femur or femoral shaft (ST/FS) or the hip. Non-fracture controls from the cohort were matched to fracture cases by sex, year of birth, and year of initiation of alendronate treatment. Conditional logistic regression models were fitted to calculate odds ratios with and without adjustment for comorbidity and comedications. Sensitivity analyses investigated subsequent treatment with other drugs for osteoporosis.Results 1428 participants sustained a ST/FS (incidence rate 3.4/1000 person years, 95% confidence interval 3.2 to 3.6), and 6784 sustained a hip fracture (16.2/1000 person years, 15.8 to 16.6). The risk of ST/FS was lower with high adherence to treatment with alendronate (medication possession ratio (MPR, a proxy for compliance) >80%) compared with poor adherence (MPR <50%; odds ratio 0.88, 0.77 to 0.99; P=0.05). Multivariable adjustment attenuated this association (adjusted odds ratio 0.88, 0.77 to 1.01; P=0.08). The risk was no higher in long term users (≥10 dose years; 0.70, 0.44 to 1.11; P=0.13) or in current compared with past users (0.91, 0.79 to 1.06; P=0.22). Similarly, MPR >80% was associated with a decreased risk of hip fracture (0.73, 0.68 to 0.78; P<0.001) as was longer term cumulative use for 5-10 dose years (0.74, 0.67 to 0.83; P<0.001) or ≥10 dose years (0.74, 0.56 to 0.97; P=0.03).Conclusions These findings support an acceptable balance between benefit and risk with treatment with alendronate in terms of fracture outcomes, even for over 10 years of continuous use.