It has been shown previously that Escherichia coli accumulates endogenously synthesized trehalose under osmotic stress. We report here that E. coli contained an osmotically regulated trehalose-phosphate synthase which utilized UDP-glucose and glucose 6-phosphate as substrates. In the wild type, the synthase was induced by growth in glucose-mineral medium of elevated osmotic strength and the synthase itself was strongly stimulated by K+ and other monovalent cations. A laboratory strain which expressed the synthase at a high constitutive level was found. GalU mutants, defective in synthesis of UDP-glucose, did not accumulate trehalose. Two genes governing the synthase were identified and named otsA and otsB (osmoregulatory trehalose synthesis). They mapped near 42 min in the flbB-uvrC region. Mutants with an otsA-lacZ or otsB-lacZ operon fusion displayed osmotically inducible beta-galactosidase activity; i.e., the activity was increased fivefold by growth in medium of elevated osmotic strength. Mutants unable to synthesize trehalose (galU, otsA, and otsB) were osmotically sensitive in glucose-mineral medium. But an osmotically tolerant phenotype was restored in the presence of glycine betaine, which also partially repressed the synthesis of synthase in the wild type and of beta-galactosidase in ots-lacZ fusion mutants.