Tenofovir-containing antiretroviral therapy regimens may have long-term toxicity-related side effects. This study aimed to compare the virological efficacy of co-formulated darunavir/ritonavir plus lamivudine with darunavir/ritonavir plus tenofovir and emtricitabine or lamivudine. The ANDES study was a 48-week, phase 4, randomized, open-label, non-inferiority trial in treatment-naïve adults living with human immunodeficiency virus (HIV). Patients were randomized on a 1:1 basis to receive a daily oral regimen of either dual therapy based on a generic co-formulation of darunavir/ritonavir (800/100 mg) plus a generic lamivudine 300 mg pill, or triple therapy with darunavir/ritonavir plus tenofovir/emtricitabine (300/200 mg) or tenofovir/lamivudine (300/300 mg). The primary endpoint was the proportion of patients with a viral load of <50 copies/mL at week 48 in the intention-to-treat population. The US Food and Drug Administration snapshot algorithm and a non-inferiority margin of -12% were used. The secondary objective was to analyse safety in the per-protocol population. This study has been registered at ClinicalTrials.gov (NCT02770508). Between November 2015 and 31 October 2020, 336 participants were assigned at random to the triple therapy arm (n=165) or the dual therapy arm (n=171). After 48 weeks, 153 patients in the triple therapy group (93%) and 155 patients in the dual therapy group (91%) achieved virological suppression (difference -2.1%, 95% confidence interval -7.0 to 2.9). Drug-related adverse events were more common in the triple therapy group (P=0.04). Two toxicity-related events led to discontinuation in each group. Co-formulated darunavir/ritonavir plus lamivudine showed non-inferiority and a safer toxicity profile compared with the standard-of-care triple therapy regimen including tenofovir in treatment-naïve patients.