Tenofovir is less toxic than other nucleoside reverse-transcriptase inhibitors used in antiretroviral therapy (ART) and may improve retention of human immunodeficiency virus (HIV)-infected patients on ART. We assessed the impact of national guideline changes in South Africa (2010) and Zambia (2007) recommending tenofovir for first-line ART. We applied regression discontinuity in a prospective cohort study of 52,294 HIV-infected adults initiating first-line ART within 12 months (±12 months) of each guideline change. We compared outcomes in patients presenting just before and after the guideline changes using local linear regression and estimated intention-to-treat effects on initiation of tenofovir, retention in care, and other treatment outcomes at 24 months. We assessed complier causal effects among patients starting tenofovir. The new guidelines increased the percentages of patients initiating tenofovir in South Africa (risk difference (RD) = 81 percentage points, 95% confidence interval (CI): 73, 89) and Zambia (RD = 42 percentage points, 95% CI: 38, 45). With the guideline change, the percentage of single-drug substitutions decreased substantially in South Africa (RD = -15 percentage points, 95% CI: -18, -12). Starting tenofovir also reduced attrition in Zambia (intent-to-treat RD = -1.8% (95% CI: -3.5, -0.1); complier relative risk = 0.74) but not in South Africa (RD = -0.9% (95% CI: -5.9, 4.1); complier relative risk = 0.94). These results highlight the importance of reducing side effects for increasing retention in care, as well as the differences in population impact of policies with heterogeneous treatment effects implemented in different contexts.