Raltegravir (MK-0518) is an HIV-1 integrase inhibitor with potent in-vitro activity against HIV-1 strains including those resistant to currently available antiretroviral drugs. The aim of this study was to assess the safety and efficacy of raltegravir when added to optimised background regimens in HIV-infected patients. HIV-infected patients with HIV-1 RNA viral load over 5000 copies per mL, CD4 cell counts over 50 cells per muL, and documented genotypic and phenotypic resistance to at least one nucleoside reverse transcriptase inhibitor, one non-nucleoside reverse transcriptase inhibitor, and one protease inhibitor were randomly assigned to receive raltegravir (200 mg, 400 mg, or 600 mg) or placebo orally twice daily in this multicentre, triple-blind, dose-ranging, randomised study. The primary endpoints were change in viral load from baseline at week 24 and safety. Analyses were done on a modified intention-to-treat basis. This trial is registered with ClinicalTrials.gov, with the number NCT00105157. 179 patients were eligible for randomisation. 44 patients were randomly assigned to receive 200 mg raltegravir, 45 to receive 400 mg raltegravir, and 45 to receive 600 mg raltegravir; 45 patients were randomly assigned to receive placebo. One patient in the 200 mg group did not receive treatment and was therefore excluded from the analyses. For all groups, the median duration of previous antiretroviral therapy was 9.9 years (range 0.4-17.3 years) and the mean baseline viral load was 4.7 (SD 0.5) log10 copies per mL. Four patients discontinued due to adverse experiences, three (2%) of the 133 patients across all raltegravir groups and one (2%) of the 45 patients on placebo. 41 patients discontinued due to lack of efficacy: 14 (11%) of the 133 patients across all raltegravir groups and 27 (60%) of the 45 patients on placebo. At week 24, mean change in viral load from baseline was -1.80 (95% CI -2.10 to -1.50) log10 copies per mL in the 200 mg group, -1.87 (-2.16 to -1.58) log10 copies per mL in the 400 mg group, -1.84 (-2.10 to -1.58) log10 copies per mL in the 600 mg group, and -0.35 (-0.61 to -0.09) log(10) copies per mL for the placebo group. Raltegravir at all doses showed a safety profile much the same as placebo; there were no dose-related toxicities. In patients with few remaining treatment options, raltegravir at all doses studied provided better viral suppression than placebo when added to an optimised background regimen. The safety profile of raltegravir is comparable with that of placebo at all doses studied.