Objective: Ketamine has interesting pharmacological properties for sedation-analgesia in intensive care. However, there are few studies on its benefit-risk balance. The aim of this study was to evaluate the efficacy and safety of ketamine compared with midazolam + fentanyl in mechanically ventilated patients. Methods: Randomised, non-inferiority, open-label, multicentre controlled trial. Patients aged 18 years or older requiring invasive mechanical ventilation for at least 24 hours were randomised to receive, after rapid sequence intubation, ketamine at a starting dose of 0.5 mg/kg/h (n = 191) or midazolam 0.2mg/kg/h + fentanyl 1μg/kg/h (n =191). Infusion rates were subsequently adjusted to achieve a RASS score between -2 and +1. The primary endpoint was the percentage of time spent in the RASS range -2 to +1 without the use of an alternative sedative; secondary endpoints included level of analgesia, adverse events (AEs), length of stay and mechanical ventilation, and cost of sedation. Results: In total, 73.5% of patients in the ketamine group vs. 71.3% in the midazolam group were within the target RASS range, a difference of 2.2% [95% CI: -3.2% to 7.5%]; p = 0.18. The most frequently observed AEs in the ketamine group were hypersalivation (21.2% vs. 2.3%; p<0.001), psychodysleptic phenomena (19.8% vs. 2.6%;p<0.001) and hallucinations (9.42% vs. 1.04%; p<0.001). Delirium was the only AE more frequent in the Midazolam group than in the Ketamine group (23.5% vs 43.4%; p < 0.0001). However, the risk of arterial hypertension (7.3% vs 4.2%; p = 0.188), diarrhoea (0% vs 5%; p = 0.05) and self-extubation (3.1% vs 4.2%; p = 0.452) did not differ between the 2 groups. The length of stay in intensive care between the 2 groups was 6.3 ± 1.6 days vs 7.3 ± 1.7 days (p < 0.001) and that of mechanical ventilation 4.1 ± 0.94 days vs 4.84 ± 0.85 days (p < 0.001). The daily cost of sedative treatment was lower with ketamine than with midazolam ($32.4 ± 0.8 vs $43 ± 6.3; p<0.001). Conclusion: In this study, the efficacy of ketamine was not inferior to that of the midazolam + fentanyl combination, but its safety was poorer. Its low cost is a real advantage in our context.