The virologic and pharmacologic mechanisms of virologic failure (VF) were studied in 243 antiretroviral-naive patients starting first-line protease inhibitor (PI)-containing therapy (nelfinavir in 66% and indinavir in 19%). Among the 220 patients with follow-up data, VF occurred in 35 (16%) during the first year of follow-up. A higher baseline virus load and poorer adherence to therapy were associated with VF. At the time of VF, key PI-resistance mutations were detected in 11 (48%) of 23 patients who started on nelfinavir but were absent in 6 patients with indinavir treatment failure. PI plasma levels were more often below the range of active concentrations in VF with wild-type viruses (74%) than in VF with PI-resistant viruses (25%; P=.02). The mechanisms of early VF and of selection of PI-resistant viruses differed by type of PI and were dependent on PI plasma levels.