Background: Coformulated elvitegravir, cobicistat, emtricitabine, and tenofovir disoproxil fumarate (tenofovir) might be a safe and efficacious switch option for virologically suppressed patients with HIV who have neuropsychiatric side-effects on a non-nucleoside reverse transcriptase inhibitor (NNRTI) or who are on a multitablet NNRTI-containing regimen and want a regimen simplification. We assessed the non-inferiority of such a switch compared with continuation of an NNRTI-containing regimen. Methods: STRATEGY-NNRTI is a 96 week, international, multicentre, randomised, open-label, phase 3b, non-inferiority trial enrolling adults (≥18 years) with HIV-1 and plasma HIV RNA viral load below 50 copies per mL for at least 6 months on an NNRTI plus emtricitabine and tenofovir regimen. With a computer-generated randomisation sequence, we randomly allocated participants (2:1; blocks of six, stratified by efavirenz use at screening) to switch to coformulated elvitegravir, cobicistat, emtricitabine, and tenofovir (switch group) or continue the NNRTI plus emtricitabine and tenofovir regimen (no-switch group). Key eligibility criteria included no history of virological failure and an estimated glomerular filtration rate of 70 mL per min or greater. The primary endpoint was the proportion of participants with plasma viral loads below 50 copies per mL at week 48 based on a snapshot algorithm with a non-inferiority margin of 12% (assessed by modified intention to treat). This trial is ongoing and is registered at ClinicalTrials.gov, number NCT01495702. Findings: Between Dec 29, 2011, and Dec 13, 2012, we randomly allocated 439 participants to treatment: 290 participants in the switch group and 143 participants in the no-switch group received treatment and were included in the modified intention-to-treat population. At week 48, 271 (93%) of 290 participants in the switch group and 126 (88%) of 143 participants in the no-switch group maintained plasma viral loads below 50 copies per mL (difference 5·3%, 95% CI -0·5 to 12·0; p=0·066). We detected no treatment-emergent resistance in either group. Safety events leading to discontinuation were uncommon in both groups: six (2%) of 291 participants in the switch group and one (1%) of 143 in the no-switch group. Interpretation: Coformulated elvitegravir, cobicistat, emtricitabine, and tenofovir seems to be efficacious and well tolerated in virologically suppressed adults with HIV and might be a suitable alternative for patients on an NNRTI with emtricitabine and tenofovir regimen considering a regimen modification or simplification. Funding: Gilead Sciences.