Both didanosine and zalcitabine are commonly used to treat patients with human immunodeficiency virus (HIV) infection who cannot tolerate zidovudine treatment or who have had disease progression despite it. The relative efficacy and safety of these second-line therapies are not well defined. In this multicenter, open-label trial we randomly assigned 467 patients who previously received zidovudine and had 300 or fewer CD4 cells per cubic millimeter or a diagnosis of the acquired immunodeficiency syndrome (AIDS) to treatment with either didanosine (500 mg per day) or zalcitabine (2.25 mg per day). After a median follow-up of 16 months, disease progression or death occurred in 157 of 230 patients assigned to didanosine and 152 of 237 patients assigned to zalcitabine, for a relative risk of 0.93 for the zalcitabine group as compared with the didanosine group (P = 0.56), which decreased to 0.84 (P = 0.15) after adjustment for the CD4 count, Karnofsky score, and presence of AIDS at base line. There were 100 deaths in the didanosine group and 88 in the zalcitabine group, for a relative risk of 0.78 (P = 0.09) and an adjusted relative risk of 0.63 (P = 0.003). A majority of patients in each group (66 percent) had at least one adverse event during treatment (153 patients taking didanosine and 157 taking zalcitabine). Peripheral neuropathy and stomatitis occurred more often with zalcitabine and diarrhea and abdominal pain more frequently with didanosine. For patients with HIV infection who have not responded to treatment with zidovudine, zalcitabine is at least as efficacious as didanosine in delaying disease progression and death.