We evaluated the efficacy of raltegravir and the development of viral resistance in two identical trials involving patients who were infected with human immunodeficiency virus type 1 (HIV-1) with triple-class drug resistance and in whom antiretroviral therapy had failed. We conducted subgroup analyses of the data from week 48 in both studies according to baseline prognostic factors. Genotyping of the integrase gene was performed in raltegravir recipients who had virologic failure. Virologic responses to raltegravir were consistently superior to responses to placebo, regardless of the baseline values of HIV-1 RNA level; CD4 cell count; genotypic or phenotypic sensitivity score; use or nonuse of darunavir, enfuvirtide, or both in optimized background therapy; or demographic characteristics. Among patients in the two studies combined who were using both enfuvirtide and darunavir for the first time, HIV-1 RNA levels of less than 50 copies per milliliter were achieved in 89% of raltegravir recipients and 68% of placebo recipients. HIV-1 RNA levels of less than 50 copies per milliliter were achieved in 69% and 80% of the raltegravir recipients and in 47% and 57% of the placebo recipients using either darunavir or enfuvirtide for the first time, respectively. At 48 weeks, 105 of the 462 raltegravir recipients (23%) had virologic failure. Genotyping was performed in 94 raltegravir recipients with virologic failure. Integrase mutations known to be associated with phenotypic resistance to raltegravir arose during treatment in 64 patients (68%). Forty-eight of these 64 patients (75%) had two or more resistance-associated mutations. When combined with an optimized background regimen in both studies, a consistently favorable treatment effect of raltegravir over placebo was shown in clinically relevant subgroups of patients, including those with baseline characteristics that typically predict a poor response to antiretroviral therapy: a high HIV-1 RNA level, low CD4 cell count, and low genotypic or phenotypic sensitivity score. (ClinicalTrials.gov numbers, NCT00293267 and NCT00293254.) 2008 Massachusetts Medical Society