Background: The presence of extended-spectrum β-lactamases (ESBLs) is increasing worldwide and blaCTX-M1 is the predominant β-lactamase. Objective: This study was conducted to determine the ESBL production and prevalence of blaCTX-M1, blaSHV and blaTEM and AmpC genes and repetitive extragenic palindromic polymerase chain reaction (rep-PCR) pattern among Klebsiella pneumoniae isolates in Tehran from 2014 to 2016. Materials and Methods: One hundred eleven isolates were collected during the study period. The PCR was employed to detect the blaCTX-M1, blaSHV, blaTEM and AmpC genes. The genetic relation of isolates was performed using rep-PCR typing method. Results: Eighty-three and 86 isolates showed Minimum inhibitory concentration (MIC) ≥2 against ceftazidime and cefotaxime, respectively and 80 (72%) isolates exhibited ESBL production. The prevalence of blaCTX-M1, blaSHV, blaTEM and AmpC genes among ESBL producers was 92.5% (n = 74), 66.2% (n = 53), 56.2% (n = 45) and 2.5% (n = 2), respectively. The rep-PCR typing pattern of isolates showed a wide diversity, indicating the polyclonal spread of CTX-M type producing isolates. Conclusion: The findings of this study highlighted the emergence and spread of K. pneumoniae isolates producing CTX-M and other ESBL enzymes with diverse genetic backgrounds in a hospital in Tehran.