BACKGROUND--Studies attempting to identify the prognostic factors that influence the outcome of Pneumocystis carinii pneumonia (PCP) in patients with AIDS using a multivariate analysis are few. In order to identify those prognostic factors amenable to medical intervention, univariate and multivariate analyses were performed on 102 patients with AIDS suffering a first episode of PCP. METHODS--One hundred and two consecutive patients with AIDS (51% drug abusers, 45% homosexuals, and 4% with other HIV risk factors) admitted to our institution between 1986 and 1989 whose respiratory infection was diagnosed by bronchoalveolar lavage were studied prospectively. RESULTS--The overall mortality was 28%, rising to 79% in those patients who required mechanical ventilation. According to univariate analysis the following variables were related to a poor prognosis: age > 35 years; risk factor for HIV infection other than drug abuse; and AIDS diagnosis confirmed before 1988; PaO2 < 8 kPa at admission; severe acute respiratory failure on admission (PaO2/FIO2 < 20 kPa); mechanical ventilation; antibiotic therapy for PCP other than trimethoprim-sulphamethoxazole; multiple microbial pulmonary infection; serum lactate dehydrogenase (LDH) > 22.5 mukat/l on admission; serum albumin level < 30 g/l. Multivariate analysis showed that only mechanical ventilation was independently associated with a poor outcome. CONCLUSIONS--The mortality of AIDS patients presenting with a first episode of PCP before 1990 was high (28%). The main prognostic factor associated with poor outcome was the requirement for mechanical ventilation due to severe acute respiratory failure.