Background: This descriptive cross-sectional study was conducted to determine the antibacterial activity of Lactobacillus strains isolated from buffalo milk and yogurt in Aliabad-e Katul city, Golestan province, north-east of Iran. Methods: Raw milk and yogurt samples were collected and cultured on MRS medium by incubating anaerobically at 37°C for 48 hours. The suspected colonies were identified on the basis of Gram staining, biochemical tests, and carbohydrates fermentation. The antibacterial activity of the cell-free supernatant (CFS) extracted from Lactobacillus strains was determined using the agar well diffusion method against standard strains of Escherichia coli ATCC 11303, Klebsiella pneumoniae ATCC 13883, and Pseudomonas aeruginosa ATCC 15442 as well as gram-negative uropathogens previously isolated from patients with urinary tract infections (UTIs). Three isolates of E. coli (E1, E2, and E3), two isolates of P. aeruginosa (P1 and P2), and two isolates of K. pneumoniae (K1 and K2) were used in this study. Results: A total of 19 Lactobacillus strains were identified as L. plantarum, L. casei, L. acidophilus, and L. helveticus. Based on the results of antibacterial activity test, the isolates had the highest and lowest inhibitory effects on the E. coli and K. pneumoniae isolates, respectively. Among the isolates, only L. casei isolates showed inhibitory activity against K. pneumoniae isolates. Conclusions: In this study, Lactobacilli from buffalo milk and yogurt demonstrated a good inhibitory activity against E. coli as a common cause of urinary tract infection. Therefore, further studies are recommended to elucidate their potential for being used as an alternative to antibiotic therapy.