A method of treating postoperative pain in a patient undergoing a surgery id described. The method is based on preoperative administration of a buprenorphine-containing transdermal dosage form. The dosage form can be administered to the patient, for example, 1-4 days prior to surgery. Alternative embodiments of the invention include subsequent transdermal dosage forms to treat the postoperative pain.