Objective: To compare changes over 48 weeks in bone mineral density (BMD) between participants randomized to lopinavir/ritonavir (LPV/r) + raltegravir (RAL) or LPV/r + 2-3 nucleoside/nucleotide reverse transcriptase inhibitors (N(t)RTIs) as second line therapy. Design: 48-week open-label sub-study of the Second Line trial conducted in South Africa, India, Thailand, Malaysia and Argentina. Methods: Dual energy X-ray absorptiometry scans of proximal femur and lumbar spine were performed at baseline and week 48. Linear regression was used to compare means of differences between arms. McNemars test compared osteopenia and osteoporosis. Associations between percentage BMD changes and baseline variables were assessed by multivariate linear regression. Results: Two hundred and ten participants were randomized. Analyses were adjusted for sex, BMI and smoking status. Mean (95% CI) proximal femur BMD% reduced over 48 weeks by -5.2% (-6.7 to -3.8%) in the LPV/r+2-3N(t)RTIs arm and by -2.9% (-4.3 to -1.5%) in the LPV/r+RAL arm (P = 0.0001). Lumbar spine BMD reduced by -4.2% (-5.7 to -2.7%) in the LPV/r+2-3N(t)RTIs arm and by -2.0% (-3.5 to -0.6%) in the LPV/r+RAL arm (P = 0.0006). The incidence of osteopenia (7.6%) and osteoporosis (2.0%) assessed over 48 weeks were similar between arms. Reduced BMD over 48 weeks was significantly associated with longer duration of tenofovir on study [% change (SE) -1.58 (0.38) femur, -1.65 (0.38) spine, P = 0.0001] and low baseline BMI [% change (SE) 0.5 (0.13) femur, 0.17 (0.07) spine; P < 0.01]. Conclusion: An N(t)RTI-sparing antiretroviral regimen of LPV/r and raltegravir as second line therapy is associated with less bone loss than a LPV/r regimen containing N(t)RTIs.