1, 4, 5, 6-Tetrahydro-2-methyl-4-pyrimidine carboxylic acid (ectoine) is an excellent osmoprotectant. Ectoine and hydroxyl ectoines are of great significance to the biotechnology industry, thus the detection and isolation of ectoine producing bacteria is of great importance. Hence, this study involved the detection of the ectC gene (encoding ectoin synthase enzyme) using polymerase chain reaction (PCR) method. For isolation of moderately halophilic bacteria, environmental samples were collected from various sites of a tannery factory in Isfahan, and the Persian Gulf. A synthetic broth medium was used and the optimum concentration of salt (NaCl) was determined by the microtitre plate method. Based on the alignment of relevant ectC gene sequences available in the GenBank which included sequences from 24 validly described Halomonas species, putative genus-specific primers were designed. Primers were designed in such a way to amplify a 277bp region of the ectC gene in the putative Halomonas strains. PCR analysis showed that 75% (34/45) of the samples belong to the Halomonas genus capable of producing ectoine synthase. Ectoine primer pair was designed to amplify all Halomonas species capable of producing ectoine synthase.