Summary Background Critically ill patients often require emergency intubation. The use of etomidate as the sedative agent in this context has been challenged because it might cause a reversible adrenal insufficiency, potentially associated with increased in-hospital morbidity. We compared early and 28-day morbidity after a single dose of etomidate or ketamine used for emergency endotracheal intubation of critically ill patients. Methods In this randomised, controlled, single-blind trial, 655 patients who needed sedation for emergency intubation were prospectively enrolled from 12 emergency medical services or emergency departments and 65 intensive care units in France. Patients were randomly assigned by a computerised random-number generator list to receive 0·3 mg/kg of etomidate (n=328) or 2 mg/kg of ketamine (n=327) for intubation. Only the emergency physician enrolling patients was aware of group assignment. The primary endpoint was the maximum score of the sequential organ failure assessment during the first 3 days in the intensive care unit. We excluded from the analysis patients who died before reaching the hospital or those discharged from the intensive care unit before 3 days (modified intention to treat). This trial is registered with ClinicalTrials.gov, number NCT00440102. Findings 234 patients were analysed in the etomidate group and 235 in the ketamine group. The mean maximum SOFA score between the two groups did not differ significantly (10·3 [SD 3·7] for etomidate vs 9·6 [3·9] for ketamine; mean difference 0·7 [95% CI 0·0–1·4], p=0·056). Intubation conditions did not differ significantly between the two groups (median intubation difficulty score 1 [IQR 0–3] in both groups; p=0·70). The percentage of patients with adrenal insufficiency was significantly higher in the etomidate group than in the ketamine group (OR 6·7, 3·5–12·7). We recorded no serious adverse events with either study drug. Interpretation Our results show that ketamine is a safe and valuable alternative to etomidate for endotracheal intubation in critically ill patients, and should be considered in those with sepsis. Funding French Ministry of Health.