Although pneumonia is a leading cause of death from infectious disease worldwide, comprehensive information about its causes and incidence in low- and middle-income countries is lacking. Active surveillance of hospitalized patients with pneumonia is ongoing in Thailand. Consenting patients are tested for seven bacterial and 14 viral respiratory pathogens by PCR and viral culture on nasopharyngeal swab specimens, serology on acute/convalescent sera, sputum smears and antigen detection tests on urine. Between September 2003 and December 2005, there were 1730 episodes of radiographically confirmed pneumonia (34·6% in children aged <5 years); 66 patients (3·8%) died. A recognized pathogen was identified in 42·5% of episodes. Respiratory syncytial virus (RSV) infection was associated with 16·7% of all pneumonias, 41·2% in children. The viral pathogen with the highest incidence in children aged <5 years was RSV (417·1/100 000 per year) and in persons aged ⩾50 years, influenza virus A (38·8/100 000 per year). These data can help guide health policy towards effective prevention strategies.