Routine monitoring of plasma HIV RNA among HIV-infected patients on antiretroviral therapy (ART) is unavailable in many resource-limited settings. Alternative monitoring approaches correlate poorly with virologic failure and can substantially delay switch to second-line therapy. We evaluated the impact of delayed switch on mortality among patients with virologic failure in Africa. A cohort. We examined patients with confirmed virologic failure on first-line nonnucleoside reverse transcriptase inhibitor (NNRTI)-based regimens from four cohorts with serial HIV RNA monitoring in Uganda and South Africa. Marginal structural models aimed to estimate the effect of delayed switch on mortality in a hypothetical trial in which switch time was randomly assigned. Inverse probability weights adjusted for measured confounders including time-updated CD4+ T-cell count and HIV RNA. Results: Among 823 patients with confirmed virologic failure, the cumulative incidence of switch 180 days after failure was 30% [95% confidence interval (CI) 27-33]. The majority of patients (74%) had not failed immunologically as defined by WHO criteria by the time of virologic failure. Adjusted mortality was higher for individuals who remained on first-line therapy than for those who had switched [odds ratio (OR) 2.1, 95% CI 1.1-4.2]. Among those without immunologic failure, the relative harm of failure to switch was similar (OR 2.4; 95% CI 0.99-5.8) to that of the entire cohort, although of borderline statistical significance. Among HIV-infected patients with confirmed virologic failure on first-line ART, remaining on first-line therapy led to an increase in mortality relative to switching. Our results suggest that detection and response to confirmed virologic failure could decrease mortality.