Genotyping at the internal transcribed spacer (ITS) regions of the nuclear rRNA operon was performed on isolates of P. carinii sp. f. hominis from three clusters of P. carinii pneumonia among eight patients with haematological malignancies and six with HIV infection. Nine different ITS sequence types of P. carinii sp. f. hominis were identified in the samples from the patients with haematological malignancies, suggesting that this cluster of cases of P. carinii pneumonia was unlikely to have resulted from nosocomial transmission. A common ITS sequence type was observed in two of the patients with haematological malignancies who shared a hospital room, and also in two of the patients with HIV infection who had prolonged close contact on the ward. In contrast, different ITS sequence types were detected in samples from an HIV-infected homosexual couple who shared the same household. These data suggest that person-to-person transmission of P. carinii sp. f. hominis may occur from infected to susceptible immunosuppressed patients with close contact within hospital environments. However direct transmission between patients did not account for the majority of cases within the clusters, suggesting that person-to-person transmission of P. carinii sp. f. hominis infection may be a relatively infrequent event and does not constitute the major route of transmission in man.