The pharmacist's role in an inpatient program using behavior-modification methods for management of chronic pain is described. Patients with chronic pain of at least six months' duration are admitted to the program; those with psychotic behavior or medical or surgical problems are excluded. During a six-week stay, patients are managed by an interdisciplinary team. The pharmacist and the patient negotiate a contract for stepwise decreases in use of analgesic and sedative drugs. Medications are administered on a regular time schedule, not on demand. The pharmacist also teaches patients and families about drugs and their proper use. A survey showed that most patients in the sample were using less medication three months after discharge than before admission to the program. Pharmacists can participate in management of patients with chronic pain by planning a method for reducing the amount of medication used and by educating patients and their families about drugs.