The global spread of antibiotic resistance among Enterobacteriaceae is largely due to multidrug resistance plasmids that can transfer between different bacterial strains and species. Horizontal gene transfer of resistance plasmids can complicate hospital outbreaks and cause problems in epidemiological tracing, since tracing is usually based on bacterial clonality. We have developed a method, based on optical DNA mapping combined with Cas9-assisted identification of resistance genes, which is used here to characterize plasmids during an extended-spectrum β-lactamase (ESBL)-producing Enterobacteriaceae outbreak at a Swedish neonatal intensive care unit. The outbreak included 17 neonates initially colonized with ESBL-producing Klebsiella pneumoniae (ESBL-KP), some of which were found to carry additional ESBL-producing Escherichia coli (ESBL-EC) in follow-up samples. We demonstrate that all ESBL-KP isolates contained two plasmids with the blaCTX-M-15 gene located on the smaller one (~80 kbp). The same ESBL-KP clone was present in follow-up samples for up to 2 years in some patients, and the plasmid carrying the blaCTX-M-15 gene was stable throughout this time period. However, extensive genetic rearrangements within the second plasmid were observed in the optical DNA maps for several of the ESBL-KP isolates. Optical mapping also demonstrated that even though other bacterial clones and species carrying blaCTX-M group 1 genes were found in some neonates, no transfer of resistance plasmids had occurred. The data instead pointed toward unrelated acquisition of ESBL-producing Enterobacteriaceae (EPE). In addition to revealing important information about the specific outbreak, the method presented is a promising tool for surveillance and infection control in clinical settings.IMPORTANCE This study presents how a novel method, based on visualizing single plasmids using sequence-specific fluorescent labeling, could be used to analyze the genetic dynamics of an outbreak of resistant bacteria in a neonatal intensive care unit at a Swedish hospital. Plasmids are a central reason for the rapid global spread of bacterial resistance to antibiotics. In a single experimental procedure, this method replaces many traditional plasmid analysis techniques that together provide limited details and are slow to perform. The method is much faster than long-read whole-genome sequencing and offers direct genetic comparison of patient samples. We could conclude that no transfer of resistance plasmids had occurred between different bacteria during the outbreak and that secondary cases of ESBL-producing Enterobacteriaceae carriage were instead likely due to influx of new strains. We believe that the method offers potential in improving surveillance and infection control of resistant bacteria in hospitals.