Updated WHO guidelines recommend a dolutegravir-based regimen as the preferred first-line treatment for HIV infection and low-dose efavirenz (400 mg) as an alternative. We aimed to report the non-inferior efficacy of dolutegravir compared with efavirenz 400 mg at week 96. We did a multicentre, randomised, open label, phase 3 trial in in three hospitals in Yaoundé, Cameroon, in HIV-1 infected antiretroviral-naive adults with an HIV RNA viral load of greater than 1000 copies per mL to compare dolutegravir 50 mg with efavirenz 400 mg (reference treatment), both combined with lamivudine and tenofovir disoproxil fumarate. The primary endpoint was the proportion with a viral load of less than 50 copies per mL at week 48 (10% non-inferiority margin). The study is registered with ClinicalTrials.gov, NCT02777229 and is ongoing. Between July, 2016, and August, 2019, of 820 patients assessed, 613 were randomly assigned to receive at least one dose of study medication, with 310 in the dolutegravir group and 303 in the efavirenz 400 mg group. At week 96 in the intention-to-treat analysis, 229 (74%) of 310 patients receiving dolutegravir and 219 (72%) of 303 patients receiving efavirenz, achieved plasma HIV-1 RNA less than 50 copies per mL (difference 1·6%, 95% CI -5·4 to 8·6; p=0.66). Viral load suppression was reached significantly more rapidly in the dolutegravir group (p<0·001). Virological failure (>1000 copies per mL) was observed in 27 patients (eight in the dolutegravir group, among which, three women switched to efavirenz 600 mg because of the dolutegravir teratogeneicity signal, and 19 in the efavirenz 400 mg group). No acquired resistance mutations to dolutegravir were observed against 17 mutations to efavirenz with or without mutations to lamivudine and tenofovir disoproxil fumarate among the 19 efavirenz 400 mg participants with virological failure. Weight gain was greater in the dolutegravir group (median weight gain, 5·0 kg in the dolutegravir group and 3·0 kg in the efavirenz 400 mg group, p<0·001, and incidence of obesity, 22% in the dolutegravir group and 16% in the efavirenz 400 mg group, p=0·043). The incidence of new WHO HIV-related stage 3 and 4 events was similar in each group (12 [4%] in each group). The two groups had similar rates of serious adverse events (28 [9%] of 310 in the dolutegravir group and 21 [7%] of 303 in the efavirenz 400 mg group). 18 deaths were observed during the 96-week follow-up (eight in the dolutegravir group and ten in the efavirenz 400 mg group). The non-inferior efficacy of the dolutegravir-based regimen and non-emergence of dolutegravir resistance at 96 weeks supports its use as a first-line regimen for antiretroviral-naive adults with HIV-1 infection. Viral load suppression was reached more quickly in the dolutegravir group and weight gain was significantly higher. UNITAID and the French National Agency for AIDS Research.