Perioperative opioids increase postoperative pain and morphine requirement, suggesting acute opioid tolerance. Furthermore, opioids elicit N-methyl-D-aspartate (NMDA)-dependent pain hypersensitivity. We investigated postfentanyl morphine analgesic effects and the consequences of NMDA-receptor antagonist (ketamine) pretreatment. The rat nociceptive threshold was measured by the paw-pressure vocalization test. Four fentanyl boluses (every 15 min) elicited a dose-dependent (a) increase followed by an immediate decrease of the nociceptive threshold and (b) reduction of the analgesic effect of a subsequent morphine administration (5 mg/kg): -15.8%, -46.6%, -85.1% (4 x 20, 4 x 60, 4 x 100 microg/kg of fentanyl, respectively). Ketamine pretreatment (10 mg/kg) increased the fentanyl analgesic effect (4 x 60 microg/kg), suppressed the immediate hyperalgesic phase, and restored the full effect of a subsequent morphine injection. Fentanyl also elicited a delayed dose-dependent long-lasting decrease of the nociceptive threshold (days) that was prevented by a single ketamine pretreatment before fentanyl. However, a morphine administration at the end of the fentanyl effects restored the long-lasting hyperalgesia. Repeated ketamine administrations were required to obtain a complete preventive effect. Although ketamine had no analgesic effect per se at the dose used herein, our results indicate that sustained NMDA-receptor blocking could be a fruitful therapy for improving postoperative morphine effectiveness. Fentanyl-induced analgesia is followed by early hyperalgesia (hours), acute tolerance to the analgesic effects of morphine, and long-lasting hyperalgesia (days). All these phenomena are totally prevented by repeated administrations of the NMDA-receptor antagonist, ketamine, simultaneously with fentanyl and morphine administration.