Haemophilus influenzae and Streptococcus pneumoniae are often the cause of serious diseases such as meningitis. We designed a nested PCR assay to identify these pathogens from cerebrospinal fluid samples. The first-step PCR was able to detect eubacterial rRNA genes with a unified set of universal primers. In the second-step PCR, the identification primers, HI I and II and SP I and II, could detect H. influenzae and S. pneumoniae respectively through amplification of the rRNA spacer between the 16S and 23S rRNA genes. We suggest that the two-step PCR assay can be used as a novel method for the immediate and retrospective diagnosis of bacterial meningitis caused by H. influenzae and S. pneumoniae.