The efficacy of ibuprofen with scheduled administration, starting preoperatively, for postoperative pain was studied in 128 boys and girls, 4 to 12 yr old, having elective surgery. In a double blind placebo-controlled study, rectal ibuprofen (40 mg.kg-1.day-1 in divided doses) or placebo was given for up to three days. For two hours after surgery heart rate, blood pressure and respiratory rate were recorded every 15 min together with sedation scores and pain scores, as assessed by an observer and the patient. Morphine was given to all children, 0.1 mg.kg-1 iv or 0.15 mg.kg-1 im according to clinical needs. Every morning on the ward the patients were interviewed about the efficacy of the analgesic treatment. All unwanted effects were registered. In the recovery room the heart rate was lower (P < 0.05) and the patient's pain scores were less (P < 0.05) in the ibuprofen group. After orthopaedic operations children needed more opioid than after ophthalmic or general surgical procedures (P < 0.001). However, after all operations the need for additional morphine was less in the recovery room (P < 0.05), during the day of operation (P < 0.01) and during the three-day study period (P < 0.01) in children receiving ibuprofen. On the day of operation the analgesic therapy was considered to be good or very good by 44/53 and 32/49 of the children in ibuprofen and placebo groups, respectively (P < 0.05). Later, their assessments did not differ. The incidence of unwanted effects was similarly low in all groups. It is concluded that the scheduled administration of ibuprofen decreased the need for opioid analgesic, improved the pain relief during recovery and on the day of operation and did not cause additional side-effects.