Background: Isolation of the TEM beta-lactamase gene from clinical Pseudomonas aeruginosa and Escherichia coli samples provides useful information on the epidemiology of and factors involved in infections caused by these agents as well as their antibiotic resistance patterns. The aim of this study was to evaluate the antibiotic resistance of P. aeruginosa and E. coli isolated from specimens obtained in Isfahan, Iran via detection of the TEM gene. Materials and methods: In this cross-sectional study, 120 P. aeruginosa and 86 E. coli samples isolated from urine and sputum were identified using biochemical methods. Their antimicrobial resistance pattern was investigated using the Kirby-Bauer disc diffusion method. Then, phenotypic detection of extended-spectrum beta-lactamases (ESBL) was performed using a combined disc method. Finally, the TEM gene in isolated samples was examined using polymerase chain reaction (PCR). Results: P. aeruginosa isolates were found to show the highest resistance to tetracycline (97.5%) and amoxicillin (95%) and the highest sensitivity to aztreonam (97.5%) and amikacin (61.66%). 68 P. aeruginosa samples (56.6%) contained a TEM gene. E. coli isolates were found to show the highest resistance to co-trimoxazole (59.34%) and amoxicillin (55.04%), and the highest sensitivity to imipenem (69.66%) and chloramphenicol (61.92%). 62 E. coli samples (72.09%) contained a TEM gene. Conclusions: The alarming spread of ESBL-producing pathogens is a complicating factor in antimicrobial therapies. It is essential to employ diverse strategies for the supervision of the spread of these pathogens.