Abstract Background: Escherichia coli is one of the most important bacterial agents that cause diarrhea in children. Objectives: The present study was carried out to investigate the bacterial causative agents of diarrhea in children, as well as the genes that encoded for antibiotic resistance to beta-lactams in E. coli isolated from the feces of children under the age of 5 years with symptoms of diarrhea and its relationship to antibiotic resistance. Materials and Methods: One hundred stool samples were collected from the diarrhea patients. Individually 15 samples of stool were planted on several culture media, and then the bacterial isolates were diagnosed using the Vitek 2 technique. After that an antibiotic sensitivity test was conducted. Forty isolates of E. coli were subjected to molecular detection by polymerase chain reaction. Results: The results of the sensitivity test showed that most of bacterial isolates were resistant to the all tested types of antibiotic. In contrast three (7.5%) bacterial isolates were resistant to the antibiotic Amikacin, which is the lowest percentage of resistance. The results of molecular identification showed that 12 (66%) isolates were carried the blaCTX-M gene, which was significantly higher (P ≤ 0.05) compared to the isolates carrying the blaTEM gene 6 (33%) isolates. Conclusion: It can be concluded that E. coli isolated from diarrhea children under of 5 years old conferred of antibiotics resistances against a wide range of antibiotics tested could be due to genes (such as TEM and CTX-M) which encoded to this resistance activity.