Inclusion Criteria:  Age ≥ 18 years. Admitted to the NICU with a diagnosis of TBI, aneurysmal SAH or spontaneous ICH. Planned for surgery with a craniotomy or craniectomy. Expected to continue sedation and mechanical ventilation after surgery.  Exclusion Criteria:  Patient and next of kin do not read or understand spoken Danish. Known allergy to S-ketamine (the active pharmaceutical ingredient or the excipients). Wake-up call to occur immediately after surgery. Pregnancy (all female participants aged ≤ 50 years will have a blood hCG taken to control for pregnancy). Active anti-psychotic treatment before admission Current abuse of ketamine.  Since this is an emergency trial informed consent will be obtained from a trial guardian before inclusion of the participant, and informed consent will be sought from next of kin as soon as possible.