Combination antiretroviral therapy with protease inhibitors has transformed HIV infection from a terminal condition into one that is manageable. However, the complexity of regimens makes adherence to therapy difficult. To assess the effects of different levels of adherence to therapy on virologic, immunologic, and clinical outcome; to determine modifiable conditions associated with suboptimal adherence; and to determine how well clinicians predict patient adherence. Prospective, observational study. HIV clinics in a Veterans Affairs medical center and a university medical center. 99 HIV-infected patients who were prescribed a protease inhibitor and who neither used a medication organizer nor received their medications in an observed setting (such as a jail or nursing home). Adherence was measured by using a microelectronic monitoring system. The adherence rate was calculated as the number of doses taken divided by the number prescribed. Patients were followed for a median of 6 months (range, 3 to 15 months). During the study period, 45,397 doses of protease inhibitor were monitored in 81 evaluable patients. Adherence was significantly associated with successful virologic outcome (P < 0.001) and increase in CD4 lymphocyte count (P = 0.006). Virologic failure was documented in 22% of patients with adherence of 95% or greater, 61% of those with 80% to 94.9% adherence, and 80% of those with less than 80% adherence. Patients with adherence of 95% or greater had fewer days in the hospital (2.6 days per 1000 days of follow-up) than those with less than 95% adherence (12.9 days per 1000 days of follow-up; P = 0.001). No opportunistic infections or deaths occurred in patients with 95% or greater adherence. Active psychiatric illness was an independent risk factor for adherence less than 95% (P = 0.04). Physicians predicted adherence incorrectly for 41% of patients, and clinic nurses predicted it incorrectly for 30% of patients. Adherence to protease inhibitor therapy of 95% or greater optimized virologic outcome for patients with HIV infection. Diagnosis and treatment of psychiatric illness should be further investigated as a means to improve adherence to therapy.