This study compared the efficacy of computer-controlled infusion of alfentanil (CCiA) with patient-controlled administration of morphine (PCAM) for postoperative analgesia. Twenty patients were randomly allocated to one of the two study groups to receive either an intravenous CCiA or PCAM regimen. Pain scores measured on a visual analog scale (VAS) and the number of valid demands were used as variables to evaluate the efficacy of the postoperative analgesic therapy. In addition, the bias and inaccuracy of the pharmacokinetic data set of alfentanil used in the CCiA program were examined by determining the median performance error (MDPE), and the median absolute performance error (MDAPE). The onset of satisfactory analgesia was faster (P < 0.05) in the CCiA group (median: 20 min) than in the PCAM group (median: 50 min). The total number of demands was lower (21 vs 34, P < 0.05) and the time when the VAS score was > 3.0 was shorter (P < 0.05, 12% of the time) in the CCiA group than in the PCAM group (21% of the time). The MDPE and MDAPE were 8% and 22%, respectively. The maximum alfentanil concentrations associated with pain and the minimum effective analgesic concentrations of alfentanil varied considerably both inter- and intraindividually. In conclusion, compared to a standard intravenous PCAM regimen, a CCiA is faster in onset of analgesia and is as effective in providing postoperative analgesia.