Our study is the first to compare the nasopharyngeal microbiota of pediatric pneumonia patients and control children by 454 pyrosequencing. A distinct microbiota was associated with different pneumonia etiologies. Viral pneumonia was associated with a high abundance of the operational taxonomic unit (OTU) corresponding to Moraxella lacunata. Patients with nonviral pneumonia showed high abundances of OTUs of three typical bacterial pathogens, Streptococcus pneumoniae complex, Haemophilus influenzae complex, and Moraxella catarrhalis. Patients classified as having no definitive etiology harbored microbiota particularly enriched in the H. influenzae complex. We did not observe a commensal taxon specifically associated with health. The microbiota of the healthy nasopharynx was more diverse and contained a wider range of less abundant taxa.