Background. Ritonavir is a potent, orally bioavailable inhibitor of HIV-1 protease. We undertook an international, multicentre, randomised, double-blind, placebo-controlled trial of ritonavir in patients with HIV-1 infection and CD4-lymphocyte counts of 100 cells/μL or less, who had previously been treated with antiretroviral drugs. Methods. 1090 patients were randomly assigned twice-daily liquid oral ritonavir 600 mg (n = 543) or placebo (n = 547) while continuing treatment with up to two licensed nucleoside agents. The primary study outcome was any first new, or specified recurrent, AIDS-defining event or death. Open-label ritonavir was provided after 16 weeks in the study to any patient who had an AIDS-defining event. Findings. The baseline median CD4-lymphocyte count was 18 (IQR 10-43)/μL in the ritonavir group and 22 (10-47)/μL in the placebo group. Study medication was discontinued in 114 (21.1%) ritonavir-group patients and 45 (8.3%) placebo-group patients mainly because of initial adverse symptoms. Outcomes of AIDS-defining illness or death occurred in 119 (21.9%) ritonavir-group patients and 205 (37.5%) placebo-group patients (hazard ratio 0.53 [95% CI 0.42-0.66]; log-rank p < 0.0001) during median follow-up of 28.9 weeks, with loss to follow-up of 15 (1.4%) patients. Ritonavir was then offered to all patients; at median follow-up of 51 weeks, 87 (16%) ritonavir-group patients had died of any cause versus 126 (23%) placebo-group patients (hazard ratio 0.69 [95% CI 0.52-0.91], log-rank p = 0.0072). Interpretation. Although earlier intervention with combination therapy may provide much more effective treatment, ritonavir in patients with advanced disease and extensive previous antiretroviral use is safe and effective, lowers the risk of AIDS complications, and prolongs survival.