Background Once daily regimens are preferred for HIV-1 treatment, to facilitate adherence and improve quality of life. We compared a new once daily formulation of raltegravir to the currently marketed twice daily formulation. Methods In this randomised, double-blind, parallel-group, phase 3, non-inferiority study, we enrolled participants aged 18 years or older with HIV-1 RNA of 1000 or more copies per mL and no previous antiretroviral treatment at 139 sites worldwide. We randomly assigned participants (2:1) via an interactive voice and web response system to raltegravir 1200 mg (two 600 mg tablets) orally once daily or raltegravir 400 mg (one tablet) orally twice daily, each with tenofovir disoproxil fumarate and emtricitabine orally once daily, for up to 96 weeks. A computer-generated allocation schedule stratified randomisation by screening HIV-1 RNA value and co-infection with hepatitis B or C. Participants, sponsor personnel, investigators, and study site personnel involved in the treatment or evaluation of the participants were unaware of the treatment group assignments. The primary endpoint was the proportion of participants with HIV-1 RNA less than 40 copies per mL at week 48 assessed with the US Food and Drug Administration Snapshot algorithm. Non-inferiority was concluded if the lower bound of the two-sided 95% CI was greater than −10%. We assessed efficacy and safety in all participants who received one dose or more of study treatment. This study is registered with ClinicalTrials.gov, number NCT02131233. Findings Between May 26, 2014, and Dec 5, 2014, 802 participants were enrolled and randomly assigned, 533 to once daily treatment and 269 to twice daily; 797 received study therapy, 531 once daily and 266 twice daily. At week 48, 472 (89%) of 531 once daily recipients and 235 (88%) of 266 twice daily recipients achieved HIV-1 RNA less than 40 copies per mL (treatment difference 0·5%, 95% CI −4·2 to 5·2). Drug-related adverse events occurred in 130 (24%) of 531 participants in the once daily group (one of which was serious; none led to treatment discontinuation) and 68 (26%) of 266 participants in the twice daily group (two of which were serious; two led to treatment discontinuation). The most common drug-related adverse events were nausea (39 [7%] vs 18 [7%]), headache (16 [3%] vs 12 [5%]), and dizziness (12 [2%] vs eight [3%]). No treatment-related deaths were reported. Interpretation A once daily raltegravir 1200 mg regimen was non-inferior compared with raltegravir 400 mg twice daily for initial treatment of HIV-1 infection. These results support the use of raltegravir 1200 mg once daily for first-line therapy. Funding Merck & Co, Inc.