The aim was to study the clinical and microbiological features associated with a carbapenem-resistant Klebsiella pneumoniae isolate that had been selected in vivo by an ertapenem-containing regimen in a patient with mediastinitis despite high blood and mediastinal levels of ertapenem. Carbapenem resistance was characterized by conjugation, PCR, DNA sequencing and analysis of outer-membrane proteins. The isolates susceptible and resistant to the carbapenems were compared by ribotyping and PFGE. Resistance to all available beta-lactams was most probably due to combined production of extended-spectrum beta-lactamase (ESBL) CTX-M-15 and loss of OmpK36 porin. The results of ribotyping and PFGE suggest that the carbapenem-resistant strain was a derivative of the original mediastinal isolate rather than a superinfecting isolate. This observation stresses the risk of selection of pan-penem resistant strains of enterobacteria when ertapenem is used for the treatment of severe infections due to ESBL-producing enterobacteria.