Background and objective: This double-blind randomized study tested whether the addition of magnesium or ketamine to morphine for intravenous patient-controlled analgesia resulted in improved analgesic efficacy and lower pain scores compared with morphine patient-controlled analgesia alone after major abdominal surgery. Methods: Ninety patients (3 X 30) were randomly allocated to receive either morphine 0.4 mg mL(-1) (Group M) by patient-controlled analgesia, morphine 0.4 mg mL(-1) + MgSO4, 30 mg mL(-1) (Group MM) or morphine 0.4 mg mL(-1) + ketamine 1 mg mL(-1) (Group MK). Postoperative analgesia was started when the verbal rating scale was greater than or equal to2. Patients were first given a standardized loading dose (0.05 mg kg(-1)) of the study solution. They were then allowed to use bolus doses of this solution (0.0125 mg kg(-1) every 20 min without time limit). Discomfort, sedation, pain scores, cumulative morphine consumption and adverse effects were recorded up to 24 h after the start of the patient-controlled analgesia. Results: The level of discomfort, level of sedation and verbal rating scores decreased significantly with time in all groups (P < 0.05). Both verbal rating and discomfort scores were significantly tower in Groups MM and MK at 15, 30 and 60 min compared with Group M (P < 0.001). Cumulative morphine consumption after 12 and 24 h was significantly higher in Group M alone (median 26 and 49 mg, respectively) compared with Group MM (24.2 and 45.7 mg) and Group MK (24.4 and 46.5 mg). Conclusions: In the immediate postoperative period, the addition of magnesium or ketamine to morphine for intravenous patient-controlled analgesia led to a significantly lower consumption of morphine. However, these differences are unlikely to be of any clinical relevance.