To confirm the rapid onset anti-suicidal benefits of ketamine in the short term and at six weeks, overall and according to diagnostic group.Prospective, double blind, superiority, randomised placebo controlled trial.Seven French teaching hospitals between 13 April 2015 and 12 March 2019.Aged 18 or older with current suicidal ideation, admitted to hospital voluntarily. Exclusion criteria included a history of schizophrenia or other psychotic disorders, substance dependence, and contraindications for ketamine.156 participants were recruited and randomised to placebo (n=83) or ketamine (n=73), stratified by centre and diagnosis: bipolar, depressive, or other disorders.Two 40 minute intravenous infusions of ketamine (0.5 mg/kg) or placebo (saline) were administered at baseline and 24 hours, in addition to usual treatment.The primary outcome was the rate of patients in full suicidal remission at day 3, according to the scale for suicidal ideation total score ≤3. Analyses were conducted on an intention-to-treat basis.More participants receiving ketamine reached full remission of suicidal ideas at day 3 than those receiving placebo: 46 (63.0%) of 83 participants in the ketamine arm and 25 (31.6%) of 73 in the placebo arm (odds ratio 3.7 (95% confidence interval 1.9 to 7.3), P<0.001). This effect differed according to the diagnosis (treatment: P<0.001; interaction: P=0.02): bipolar (odds ratio 14.1 (95% confidence interval 3.0 to 92.2), P<0.001), depressive (1.3 (0.3 to 5.2), P=0.6), or other disorders (3.7 (0.9 to 17.3, P=0.07)). Side effects were limited. No manic or psychotic symptom was seen. Moreover, a mediating effect of mental pain was found. At week 6, remission in the ketamine arm remained high, although non-significantly versus placebo (69.5% v 56.3%; odds ratio 0.8 (95% confidence interval 0.3 to 2.5), P=0.7).The findings indicate that ketamine is rapid, safe in the short term, and has persistent benefits for acute care in suicidal patients. Comorbid mental disorders appear to be important moderators. An analgesic effect on mental pain might explain the anti-suicidal effects of ketamine.ClinicalTrials.gov NCT02299440.