Background The non-nucleoside reverse transcriptase inhibitor (NNRTI), rilpivirine (TMC278; Tibotec Pharmaceuticals, County Cork, Ireland), had equivalent sustained efficacy to efavirenz in a phase 2b trial in treatment-naive patients infected with HIV-1, but fewer adverse events. We aimed to assess non-inferiority of rilpivirine to efavirenz in a phase 3 trial with common background nucleoside or nucleotide reverse transcriptase inhibitors (N[t]RTIs). Methods We undertook a 96-week, phase 3, randomised, double-blind, double-dummy, non-inferiority trial in 98 hospitals or medical centres in 21 countries. We enrolled adults (≥18 years) not previously given antiretroviral therapy and with a screening plasma viral load of 5000 copies per mL or more and viral sensitivity to background N(t)RTIs. We randomly allocated patients (1:1) using a computer-generated interactive web-response system to receive oral rilpivirine 25 mg once daily or efavirenz 600 mg once daily; all patients received an investigator-selected regimen of background N(t)RTIs (tenofovir-disoproxil-fumarate plus emtricitabine, zidovudine plus lamivudine, or abacavir plus lamivudine). The primary outcome was non-inferiority (12 margin on logistic regression analysis) at 48 weeks in terms of confirmed response (viral load <50 copies per mL, defined by the intent-to-treat time to loss of virologic response [TLOVR] algorithm) in all patients who received at least one dose of study drug. This study is registered with ClinicalTrials.gov, number NCT00543725. Findings From May 22, 2008, we screened 947 patients and enrolled 340 to each group. 86 of patients (291 of 340) who received at least one dose of rilpivirine responded, compared with 82 of patients (276 of 338) who received at least one dose of efavirenz (difference 3·5 [95 CI -1·7 to 8·8]; p non-inferiority <0·0001). Increases in CD4 cell counts were much the same between groups. 7 of patients (24 of 340) receiving rilpivirine had a virological failure compared with 5 of patients (18 of 338) receiving efavirenz. 4 of patients (15) in the rilpivirine group and 7 (25) in the efavirenz group discontinued treatment due to adverse events. Grade 2-4 treatment-related adverse events were less common with rilpivirine (16 [54 patients]) than they were with efavirenz (31 ; p<0·0001), as were rash and dizziness (p<0·0001 for both) and increases in lipid levels were significantly lower with rilpivirine than they were with efavirenz (p<0·0001). Interpretation Despite a slightly increased incidence of virological failures, a favourable safety profile and non-inferior efficacy compared with efavirenz means that rilpivirine could be a new treatment option for treatment-naive patients infected with HIV-1. Funding Tibotec. © 2011 Elsevier Ltd.