All 187 Klebsiella pneumoniae isolated over six consecutive months of 1999 in 17 Portuguese health institutions were studied: 89% were resistant to ampicillin, 31% to trimethoprim/sulfamethoxazole, 17% to aminoglycosides and 3% to fluoroquinolones; 16% were multidrug-resistant and 14% expressed an extended-spectrum beta-lactamase (ESBL) phenotype confirmed by genotyping. Molecular methods identified: 11 isolates possessing bla(ESBL-SHV) genes (bla(SHV-2A), bla(SHV-5), bla(SHV-12) and bla(SHV-55)), 9 isolates with bla(ESBL-TEM) (bla(TEM-3), bla(TEM-10) and bla(TEM-24)) and 7 isolates with bla(GES-1), encoding ESBL enzymes; and 160 isolates with bla(SHV-1) and bla(SHV-type) encoding non-ESBL enzymes. Overall, 15 new beta-lactamases were detected: SHV-60 to SHV-62, SHV-71 and SHV-73 to SHV-83. The genetic relatedness of 108 isolates was studied by pulsed-field gel electrophoresis (PFGE) analysis. The isolates were diverse and 18 clusters were defined, the largest including 12 isolates of different specimens, 6 of which expressed GES-1 enzymes. Twenty additional strains isolated during a second period (March-November 2006) in three of the participating hospitals contained ESBL-encoding genes, whereas none of the isolates in the same hospitals in 1999 carried such genes: bla(SHV-5), bla(SHV-12), bla(TEM-10), bla(TEM-52), bla(CTX-M-15), bla(CTX-M-32) and bla(CTX-M-61) (first described in the country). In this period, three new enzymes were detected: SHV-106 to SHV-108. We provide evidence that the genotypes of K. pneumoniae isolates is changing towards the emergence of ESBL enzymes.