Background Delirium is a common and serious postoperative complication. Subanaesthetic ketamine is often administered intraoperatively for postoperative analgesia, and some evidence suggests that ketamine prevents delirium. The primary purpose of this trial was to assess the effectiveness of ketamine for prevention of postoperative delirium in older adults. Methods The Prevention of Delirium and Complications Associated with Surgical Treatments [PODCAST] study is a multicentre, international randomised trial that enrolled adults older than 60 years undergoing major cardiac and non-cardiac surgery under general anaesthesia. Using a computer-generated randomisation sequence we randomly assigned patients to one of three groups in blocks of 15 to receive placebo (normal saline), low-dose ketamine (0·5 mg/kg), or high dose ketamine (1·0 mg/kg) after induction of anaesthesia, before surgical incision. Participants, clinicians, and investigators were blinded to group assignment. Delirium was assessed twice daily in the first 3 postoperative days using the Confusion Assessment Method. We did analyses by intention-to-treat and assessed adverse events. This trial is registered with clinicaltrials.gov, number NCT01690988. Findings Between Feb 6, 2014, and June 26, 2016, 1360 patients were assessed, and 672 were randomly assigned, with 222 in the placebo group, 227 in the 0·5 mg/kg ketamine group, and 223 in the 1·0 mg/kg ketamine group. There was no difference in delirium incidence between patients in the combined ketamine groups and the placebo group (19·45% vs 19·82%, respectively; absolute difference 0·36%, 95% CI −6·07 to 7·38, p=0·92). There were more postoperative hallucinations (p=0·01) and nightmares (p=0·03) with increasing ketamine doses compared with placebo. Adverse events (cardiovascular, renal, infectious, gastrointestinal, and bleeding), whether viewed individually (p value for each >0·40) or collectively (36·9% in placebo, 39·6% in 0·5 mg/kg ketamine, and 40·8% in 1·0 mg/kg ketamine groups, p=0·69), did not differ significantly across groups. Interpretation A single subanaesthetic dose of ketamine did not decrease delirium in older adults after major surgery, and might cause harm by inducing negative experiences. Funding National Institutes of Health and Cancer Center Support.