Sera from blood donors and patients from all over Scotland were examined by indirect immunofluorescence using Pneumocystis carinii antigen from infected rat lung. Antibody was found in 76 of 488 (15.6%) of patients tested on clinical grounds but in only 13 of 148 (8.8%) blood donors. The antibody rates were higher in disease groups likely to have or develop P carinii pneumonia: in those with histologically confirmed or strongly suspected P carinii pneumonia the rate was 14 of 24 (58.3%); in those who had undergone transplantation eight of 24 (33.3%); in those who were immunosuppressed five of 16 (31.2%); in those who were human immunodeficiency virus antibody (HIV) positive 11 of 43 (25.6%); in those with malignancy 34 of 233 (14.6%); and in those with chest infection 10 of 85 (11.7%). P carinii pneumonia was confirmed or likely in four of 45 (8.8%) patients with titres of 1/8-1/16 and in three of seven (42.8%) in those with titres of greater than or equal to 1/128. Seroconversion or rising titre was detected in seven of 13 (53.8%) cases of confirmed or likely P carinii pneumonia compared with 10 of 93 (10.7%) in other patients. Diagnosis of P carinii infection can therefore be assisted by positive immunofluorescence results, but negative serology does not exclude infection.