Community-acquired pneumonia (CAP) is a serious lower respiratory tract infection associated with significant morbidity and mortality in immunocompromised patients. The present study evaluated the clinical spectrum of CAP in immunocompromised hosts and the role of respiratory viruses, as well as the yield of viral diagnostic methods.Conventional microbiological tests were routinely performed in immunocompromised patients with CAP. Nasopharyngeal swabs were processed for respiratory viruses by indirect immunofluorescence assay, cell culture and PCR. Four groups were defined according to aetiology of CAP, as follows: group 1 (nonviral), group 2 (mixed, nonviral and viral), group 3 (only viral) and group 4 (unknown aetiology).Over a 1-yr period, 92 patients were included. An aetiological diagnosis was achieved in 61 (66%) patients: 38 (41%), group 1; 12 (13%), group 2; and 11 (12%), group 3. The most frequent pathogen detected was Streptococcus pneumoniae (n529, 48%), followed by rhinovirus (n511, 18%). PCR identified 95% of respiratory viruses. Clinical characteristics could not reliably distinguish among the different aetiological groups.Respiratory viruses represent a substantial part of the aetiologies of community-acquired pneumonia in immunocompromised patients and its routine assessment through PCR in nasopharyngeal swabs should be considered in the clinical care of these patients.