BACKGROUNDAntiretroviral agents with novel mechanisms and dosing intervals could expand treatment options for people with HIV. Lenacapavir, an inhibitor of capsid protein that makes use of a unique mechanism, can be administered orally or subcutaneously. We sought to explore the efficacy of lenacapavir in various combination regimens as initial and maintenance therapy for HIV.METHODSIn a phase 2, randomised, open-label, ongoing study at 41 investigational sites in the USA and Dominican Republic, we randomly assigned adults with HIV who had not previously received antiretrovirals to four groups (2:2:2:1). Randomisation was stratified by plasma HIV-1 RNA load (≤100 000 or >100 000 copies per mL) at screening. Groups 1 and 2 both received lenacapavir (927 mg) subcutaneously every 26 weeks (after 2 weeks of oral loading [600 mg on days 1 and 2, followed by 300 mg on day 8]) with oral daily emtricitabine (200 mg) and tenofovir alafenamide (25 mg) for 28 weeks followed by subcutaneous lenacapavir (927 mg) plus oral daily tenofovir alafenamide (25 mg, group 1) or bictegravir (75 mg, group 2). Group 3 received oral daily lenacapavir (600 mg on days 1 and 2, followed by 50 mg daily) with emtricitabine (200 mg) and tenofovir alafenamide (25 mg). Group 4 received oral daily bictegravir (50 mg), emtricitabine (200 mg), and tenofovir alafenamide (25 mg). Participants and investigators were not masked to group assignment. The primary endpoint was the percentage of participants with virological suppression (HIV-1 RNA <50 copies per mL) at week 54, analysed in the full analysis set (all randomly assigned participants who received at least one dose of study drug) using only on-treatment data. The safety outcome measures were incidences of treatment-emergent adverse events and graded laboratory abnormalities, analysed in the full analysis set. This study is registered at ClinicalTrials.gov, NCT04143594.FINDINGSBetween Nov 22, 2019, and Aug 27, 2020, 249 people with HIV were screened, 183 participants were randomly assigned and 182 received a dose of antiretroviral drugs (52 in group 1, 53 in group 2, 52 in group 3, and 25 in group 4). 22 participants did not complete the full study course (five in group 1, 12 in group 2, four in group 3, and one in group 4). At week 54, virological suppression was 90% (47 of 52 patients) for group 1 (difference vs group 4: -2·6%, 95% CI -18·4 to 13·2), 85% (45 of 53) for group 2 (-7·1%, -23·4 to 9·3), 85% (44 of 52) for group 3 (-7·2%, -23·5 to 9·1), and 92% (23 of 25) for group 4. The most frequent non-injection-site adverse events with lenacapavir (subcutaneous or oral) were headache (13%, 21 of 157) and nausea (13%, 21 of 157). The most common lenacapavir-related injection-site reactions were erythema (27%, 28 of 105), swelling (23%, 24 of 105), and pain (19%, 20 of 105), which were generally mild or moderate. No serious adverse event related to study treatment occurred. Three participants discontinued subcutaneous lenacapavir because of grade 1 injection-site reactions (two for induration and one for erythema or swelling).INTERPRETATIONLenacapavir warrants further investigation as a potential antiretroviral used orally and as injection in combination with other antiretroviral drugs.FUNDINGGilead Sciences.