The value of continuous positive airway pressure (CPAP) ventilation via a tight fitting face mask was assessed in eight HIV-1 antibody-positive patients with Pneumocystis carinii pneumonia who were in hypoxaemic respiratory failure. All patients were conscious, able to protect their airway and not hypercapnic. Treatment was effective in seven patients. Prior to CPAP, mean (range) arterial oxygen tension was 6.7 (4.7-10.5) kPa in seven patients breathing oxygen via a face mask (FiO2 = 0.6), 6.1 kPa in one patient breathing room air and rose to 9.9 (6.8-12.8) kPa with CPAP (FiO2 = 0.6 and PEEP = 1.3 kPa in six patients and 2.6 kPa in one patient); the mean increase in PaO2 was 3.1 kPa (P less than 0.02). These seven patients experienced a rapid reduction in dyspnoea and their respiratory rate fell from a mean of 40 breaths min-1 to 32 breaths min-1 (P less than 0.001). One patient deteriorated rapidly on CPAP and died: no other complications were seen with this technique. CPAP was continued for a mean of 4.5 days and the seven responders all survived the episode of P. carinii pneumonia. We conclude that mask CPAP provides an effective means of improving oxygenation in severely hypoxaemic patients with P. carinii pneumonia.