The genes of the biosynthetic pathway of ectoine (1,4,5,6-tetrahydro-2-methyl-4-pyrimidinecarboxylic acid) from the Gram-positive moderate halophile Marinococcus halophilus were cloned by functional expression in Escherichia coli. These genes were not only expressed, but also osmoregulated in E. coli, as demonstrated by increasing cytoplasmic ectoine concentration in response to medium salinity. Sequencing of a 4.4 kb fragment revealed four major ORFs, which were designated ectA, ectB, ectC and orfA. The significance of three of these genes for ectoine synthesis was proved by sequence comparison with known proteins and by physiological experiments. Several deletion derivatives of the sequenced fragment were introduced into E. coli and the resulting clones were investigated for their ability to synthesize ectoine or one of the intermediates in its biosynthetic pathway. It was demonstrated that ectA codes for L-2,4-diaminobutyric acid acetyltransferase, ectB for L-2,4-diaminobutyric acid transaminase and ectC for L-ectoine synthase. A DNA region upstream of ectA was shown to be necessary for the regulated expression of ectoine synthesis in response to the osmolarity of the medium.