BACKGROUND Antiretroviral therapy (ART) is crucial for controlling HIV-1 infection through wide-scale treatment as prevention and pre-exposure prophylaxis (PrEP). Potent tenofovir disoproxil fumarate-containing regimens are increasingly used to treat and prevent HIV, although few data exist for frequency and risk factors of acquired drug resistance in regions hardest hit by the HIV pandemic. We aimed to do a global assessment of drug resistance after virological failure with first-line tenofovir-containing ART. METHODS The TenoRes collaboration comprises adult HIV treatment cohorts and clinical trials of HIV drug resistance testing in Europe, Latin and North America, sub-Saharan Africa, and Asia. We extracted and harmonised data for patients undergoing genotypic resistance testing after virological failure with a first-line regimen containing tenofovir plus a cytosine analogue (lamivudine or emtricitabine) plus a non-nucleotide reverse-transcriptase inhibitor (NNRTI; efavirenz or nevirapine). We used an individual participant-level meta-analysis and multiple logistic regression to identify covariates associated with drug resistance. Our primary outcome was tenofovir resistance, defined as presence of K65R/N or K70E/G/Q mutations in the reverse transcriptase (RT) gene. FINDINGS We included 1926 patients from 36 countries with treatment failure between 1998 and 2015. Prevalence of tenofovir resistance was highest in sub-Saharan Africa (370/654 [57%]). Pre-ART CD4 cell count was the covariate most strongly associated with the development of tenofovir resistance (odds ratio [OR] 1·50, 95% CI 1·27-1·77 for CD4 cell count <100 cells per μL). Use of lamivudine versus emtricitabine increased the risk of tenofovir resistance across regions (OR 1·48, 95% CI 1·20-1·82). Of 700 individuals with tenofovir resistance, 578 (83%) had cytosine analogue resistance (M184V/I mutation), 543 (78%) had major NNRTI resistance, and 457 (65%) had both. The mean plasma viral load at virological failure was similar in individuals with and without tenofovir resistance (145 700 copies per mL [SE 12 480] versus 133 900 copies per mL [SE 16 650; p=0·626]). INTERPRETATION We recorded drug resistance in a high proportion of patients after virological failure on a tenofovir-containing first-line regimen across low-income and middle-income regions. Effective surveillance for transmission of drug resistance is crucial. FUNDING The Wellcome Trust.