With the growing role of intravenous drug use in the transmission of HIV infection, HIV-infected patients frequently present with comorbid opioid dependence. Yet, few empirical evaluations of the efficacy and consequences of opioid detoxification medications in medically ill HIV-infected patients have been reported. In a randomized, double-blind clinical trial, we evaluated the impact of three medications on the signs and symptoms of withdrawal and on the pain severity in heroin-dependent HIV-infected patients (N=55) hospitalized for medical reasons on an inpatient AIDS service. Patients received a 3-day pharmacologic taper with intramuscular buprenorphine (n=21), oral clonidine (n=16), or oral methadone (n=18), followed by a clonidine transdermal patch on the fourth day. Observed and self-reported measures of opioid withdrawal and pain were taken 1-3 times daily for up to 4 days. Opiate administration used as medically indicated for pain was also recorded. Observer- and subject-rated opiate withdrawal scores decreased significantly following the first dose of medication and overall during treatment. Among all 55 subjects, self-reported and observer-reported pain decreased after treatment (on average observer-rated opioid withdrawal scale (OOWS) scores declined 5.6 units and short opioid withdrawal scale (SOWS) declined 4.8 units, P<0.001, for both) with no indication of increased pain during medication taper. There were no significant differences of pain decline and other measures of withdrawal between the three treatment groups. During the intervention period, supplemental opiates were administered as medically indicated for pain to 45% of the patients; only 34% of men versus 62% of women received morphine (P<0.05). These findings suggest buprenorphine, clonidine, and methadone regimens each decrease opioid withdrawal in medically ill HIV-infected patients.