A seminested-PCR assay, based on the amplification of the pneumococcal penicillin-binding protein 2B gene (pbp2B), was developed for the detection of penicillin-resistant and -susceptible pneumococci in cerebrospinal fluid (CSF) specimens. Species-specific primers (P5 and P6) which amplified a 682-bp conserved region of the transpeptidase-encoding region of the pbp2B gene were used. Four "resistance" primers were designed to bind to altered areas of the pbp2B gene identified in penicillin-resistant South African wild-type strains. Together with the downstream primer P6, the upstream resistance primers amplified fragments which were used to detect the presence of penicillin resistance. This system identified all 35 of the S. pneumoniae isolates evaluated, including strains of 11 different serotypes and a range of penicillin-resistant and -susceptible strains. The specificity of the assay was demonstrated by its inability to amplify DNA from other bacterial species which commonly cause meningitis. It was possible to detect pneumococcal DNA from culture-negative CSF inoculated with 2.5 pg of purified DNA or 18 CFU. Analysis of 285 CSF specimens showed that PCR detected the pneumococcus in 18 samples positive by culture, including the identification of four penicillin-resistant isolates. The positive predictive value and the negative predictive value of the assay were each 100%.