BACKGROUND: Dolutegravir has been shown to be non-inferior to an integrase inhibitor and superior to a non-nucleoside reverse transcriptase inhibitor (NNRTI). In FLAMINGO, we compared dolutegravir with darunavir plus ritonavir in individuals naive for antiretroviral therapy. METHODS: In this multicentre, open-label, phase 3b, non-inferiority study, HIV-1-infected antiretroviral therapy-naive adults with HIV-1 RNA concentration of 1000 copies per mL or more and no resistance at screening were randomly assigned (1:1) to receive either dolutegravir 50 mg once daily or darunavir 800 mg plus ritonavir 100 mg once daily, with investigator-selected tenofovir-emtricitabine or abacavir-lamivudine. Randomisation was stratified by screening HIV-1 RNA (≤100,000 or >100,000 copies per mL) and nucleoside reverse transcriptase inhibitor (NRTI) selection. The primary endpoint was the proportion of patients with HIV-1 RNA concentration lower than 50 copies per mL (Food and Drug Administration [FDA] snapshot algorithm) at week 48 with a 12% non-inferiority margin. This trial is registered with ClinicalTrials.gov, NCT01449929. FINDINGS: Recruitment began on Oct 31, 2011, and was completed on May 24, 2012, in 64 research centres in nine countries worldwide. Of 595 patients screened, 484 patients were included in the analysis (242 in each group). At week 48, 217 (90%) patients receiving dolutegravir and 200 (83%) patients receiving darunavir plus ritonavir had HIV-1 RNA of less than 50 copies per mL (adjusted difference 7·1%, 95% CI 0·9-13·2), non-inferiority and on pre-specified secondary analysis dolutegravir was superior (p=0·025). Confirmed virological failure occurred in two (<1%) patients in each group; we recorded no treatment-emergent resistance in either group. Discontinuation due to adverse events or stopping criteria was less frequent for dolutegravir (four [2%] patients) than for darunavir plus ritonavir (ten [4%] patients) and contributed to the difference in response rates. The most commonly reported (≥10%) adverse events were diarrhoea (dolutegravir 41 [17%] patients vs darunavir plus ritonavir 70 [29%] patients), nausea (39 [16%] vs 43 [18%]), and headache (37 [15%] vs 24 [10%]). Patients receiving dolutegravir had significantly fewer low-density lipoprotein values of grade 2 or higher (11 [2%] vs 36 [7%]; p=0·0001). INTERPRETATION: Once-daily dolutegravir was superior to once-daily darunavir plus ritonavir. Once-daily dolutegravir in combination with fixed-dose NRTIs represents an effective new treatment option for HIV-1-infected, treatment-naive patients. FUNDING: ViiV Healthcare and Shionogi & Co.