The genes from the extreme halophile Ectothiorhodospira halochloris encoding the biosynthesis of glycine betaine from glycine were cloned into Escherichia coli. The accumulation of glycine betaine and its effect on osmotolerance of the cells were studied. In mineral medium with NaCl concentrations from 0.15 to 0.5 M, the accumulation of both endogenously synthesized and exogenously provided glycine betaine stimulated the growth of E. coli. The intracellular levels of glycine betaine and the cellular yields were clearly higher for cells receiving glycine betaine exogenously than for cells synthesizing it. The lower level of glycine betaine accumulation in cells synthesizing it is most likely a consequence of the limited availability of precursors (e.g. S-adenosylmethionine) rather than the result of a low expression level of the genes. Glycine betaine also stimulated the growth of E. coli and decreased acetate formation in mineral medium with high sucrose concentrations (up to 200 g.l(-1)).