Fire blight, caused by Erwinia amylovora, is one of the most important diseases of fruit trees worldwide. The aim of this study was to isolate and identify rhizospheric and endophytic bacteria with antagonistic activity against Erwinia amylovora in apple and pear orchards around Gorgan, Golestan province. Root, leaf and rhizospheric soil samples were cultured on nutrient agar medium and after incubation morphological features of the appeared colonies were examined. The antagonistic activity of the isolates was determined by well diffusion agar. Chloroform test was used to evaluate the production of antimicrobial agent by antagonist isolates and catalase and protease sensitivity tests were used to determine its nature. The thermal stability of the antimicrobial agent and the effect of pH on its inhibitory activity were also evaluated. Isolates with more antagonistic activity were identified based on 16S rRNA sequencing. Fourteen isolates produced antimicrobial substance with antagonistic activity, which had a nature other than hydrogen peroxide. The antimicrobial agents from 8 isolates were proteinaceous in nature. The inhibitory activity of cell-free supernatant of these isolates was inactivated at 100 ° C and had the best effect at neutral pH. The isolates identified by molecular method had a more than 90% similarity to Bacillus subtilis strain B-12, Bacillus subtilis strain YL-3, Paenibacillus polymyxa strain DST34, Pantua aglomrans strain ACBP1 strain. In the present study, bacteria with antagonistic activity against E. amylovora were isolated from rhizosphere and endophyte, but to better judge their performance, more tests are needed in different conditions.