The contributions of viral drug resistance, drug pharmacokinetics, and treatment adherence to failure of protease inhibitor (PI)-based highly active antiretroviral therapy (HAART) have been explored in isolation. We examined the interactions between these factors. Patients on their first PI-based HAART combination for >6 months with plasma HIV viral load (VL) >1000 copies/mL ("viremic" group) were compared with patients with a stable VL <50 copies/mL ("nonviremic" group). Data were collected on adherence (measured electronically), PI plasma levels (sampled randomly, at trough and twice after an observed dose), viral genotype, and phenotype. Mean adherence was significantly lower in the viremic group (84.3% versus 100.1%; p =.005). In the viremic group, substitutions in HIV protease were detected most frequently in the following positions in subjects on indinavir (IDV): L10I/V (35.7%), M46I/L (35.7%), A71T/V (35.7%), V82A (42.9%); and for subjects on nelfinavir (NFV): D30N (50.0%), V77I (56.3%), N88D (37.5%). Phenotypic resistance was detected in 20% of isolates from patients on IDV and 42% on NFV. Lower adherence was associated with detection of fewer resistance substitutions (r = 0.52; p =.005) and less phenotypic resistance (rho = 0.56, p =.005). There were no differences between the groups in pharmacokinetics. However, in viremic subjects, lower postdose NFV levels were associated with higher resistance (rho = -0.61, p =.02).