Background Efavirenz with tenofovir-disoproxil-fumarate and emtricitabine is a preferred antiretroviral regimen for treatment-naive patients infected with HIV-1. Rilpivirine, a new non-nucleoside reverse transcriptase inhibitor, has shown similar antiviral efficacy to efavirenz in a phase 2b trial with two nucleoside/nucleotide reverse transcriptase inhibitors. We aimed to assess the efficacy, safety, and tolerability of rilpivirine versus efavirenz, each combined with tenofovir-disoproxil-fumarate and emtricitabine. Methods We did a phase 3, randomised, double-blind, double-dummy, active-controlled trial, in patients infected with HIV-1 who were treatment-naive. The patients were aged 18 years or older with a plasma viral load at screening of 5000 copies per mL or greater, and viral sensitivity to all study drugs. Our trial was done at 112 sites across 21 countries. Patients were randomly assigned by a computer-generated interactive web response system to receive either once-daily 25 mg rilpivirine or once-daily 600 mg efavirenz, each with tenofovir- disoproxil-fumarate and emtricitabine. Our primary objective was to show non-inferiority (12 margin) of rilpivirine to efavirenz in terms of the percentage of patients with confirmed response (viral load <50 copies per mL intention-to-treat time-to-loss-of-virological-response [ITT-TLOVR] algorithm) at week 48. Our primary analysis was by intention-to-treat. We also used logistic regression to adjust for baseline viral load. This trial is registered with ClinicalTrials.gov, number NCT00540449. Findings 346 patients were randomly assigned to receive rilpivirine and 344 to receive efavirenz and received at least one dose of study drug, with 287 (83) and 285 (83) in the respective groups having a confirmed response at week 48. The point estimate from a logistic regression model for the percentage difference in response was -0·4 (95 CI -5·9 to 5·2), confirming non-inferiority with a 12 margin (primary endpoint). The incidence of virological failures was 13 (rilpivirine) versus 6 (efavirenz; 11 vs 4 by ITT-TLOVR). Grade 2-4 adverse events (55  on rilpivirine vs 108  on efavirenz, p<0·0001), discontinuations due to adverse events (eight  on rilpivirine vs 27  on efavirenz), rash, dizziness, and abnormal dreams or nightmares were more common with efavirenz. Increases in plasma lipids were significantly lower with rilpivirine. Interpretation Rilpivirine showed non-inferior efficacy compared with efavirenz, with a higher virological-failure rate, but a more favourable safety and tolerability profile. Funding Tibotec. © 2011 Elsevier Ltd.