Background: Neisseria gonorrhoeae (Ng) is a common sexually transmitted infection (STI). Emerging strains resistant to first-line ceftriaxone threaten Ng management. Hence, alternative treatments are needed. We evaluated the efficacy of ertapenem, gentamicin and fosfomycin as alternatives for Ng. Methods: We included adults 18 years or older, with anorectal or urogenital gonorrhea in a randomized controlled, double-blind, non-inferiority trial (three experimental- and one control-arm). Participants were randomized (1:1:1:1) to receive: intramuscular (IM) 500mg ceftriaxone, IM 1000mg ertapenem, IM 5mg/kg gentamicin (maximum 400mg), or 6g fosfomycin orally. The primary outcome was the proportion of participants with a negative nucleic acid amplification test of the primary infected site, 7-14 days after treatment. Non-inferiority was established if the lower Hochberg-corrected 95% confidence interval for difference between experimental and control arms was greater than -10%. Findings: Between 18 September 2017 and 5 June 2020, we assigned 346 participants to ceftriaxone (n=103), ertapenem (n=103), gentamicin (n=102), and fosfomycin (n=38). The fosfomycin arm was terminated early after interim analysis revealed <60% efficacy. In the primary modified intent-to-treat (mITT) analysis, all patients (93/93) in the ceftriaxone, 99% (86/87) in the ertapenem, 93% (79/85) in the gentamicin, and 12% (4/33) in the fosfomycin arm cleared Ng [risk difference, ertapenem versus ceftriaxone, -0.01(95 CI: -0.06,0.03); gentamicin versus ceftriaxone -0.07(95%CI: -0.16,-0.005)]. Both the secondary mITT analysis (clearance within 7-28 days), and the per-protocol analyses were consistent with the primary mITT analysis. Interpretation: Single-dose 1000mg ertapenem is non-inferior to single-dose 500mg ceftriaxone in gonorrhea treatment. Clinical Trial Registration Details: The study was registered at clinicaltrials.gov (NCT03294395). Funding Information: The NABOGO trial was funded by ZonMW (project no. 848015001) and the Amsterdam Public Health Service Research and Development fund (project no. 75722378). Declaration of Interests: Dr. Jongen, Dr. Heijman, Dr. Wind, Dr. Hoornenborg, Dr. de Korne-Elenbaas, Dr. Knol, Dr. de Laat, Dr. Mathot, Dr. Prins, Dr. Bruisten, and Dr. van Dam had nothing to disclose. Dr. Boyd reports grants from ANRS, grants from SIDACTION, outside the submitted work. Dr. Schim van der Loeff reports grants from ZonMw, during the conduct of the study. Dr. de Vries reports grants from ZonMW, grants from Public Health Servicces Amsterdam, during the conduct of the study. Ethics Approval Statement: We obtained ethics approval from the Academic Medical Center Ethics Committee in Amsterdam, including permission to use ertapenem i.m. for the study (METC 2017_092, NL 60555.018.17). All patients provided written informed consent.