Eighty patients undergoing upper abdominal surgery were randomly allocated to four groups according to the postoperative pain treatment. All patients had a standardized balanced anaesthesia and for postoperative analgesia either intramuscular oxycodone and/or metamizol (IM), intercostal block with 0.5% bupivacaine (IC), epidurally 4 mg morphine (EM) or i.v. infusion of fentanyl 0.54-0.99 micrograms min-1 + on-demand boluses of 7.2-13.5 micrograms (ODAC) were given. The pain intensity 2 h postoperatively was similar in all groups, mean score ranging from 3.2-4.3 on a scale from 0-10. At 24 h also, when additional intramuscular analgesics had been administered if needed, the mean pain scores did not vary much; 2.4 in the ODAC group to 3.4 in the IC group. The time until the first request for additional analgesia was longer in the EM group than in the IM group (7.5 h vs. 3.5 h). There were no differences between the groups in chest X-ray, peak expiratory flow or respiratory rate postoperatively, but in the capillary blood-gas analyses there was a greater number of slightly elevated PCO2 values (6.0-7.3 kPa) in the ODAC group than in the others. The amount of fentanyl infused in 24 h to the ODAC patients varied considerably, 814-2233 micrograms, as did the number of on-demand boluses, 3-155. At 24 h, an efficacy rating "good" was distributed as follows: IM 9/20, IC 11/20, EM 11/20 and ODAC 13/20. In the whole patient material 92.5% rated their condition as "good" or "fair".