Glycine betaine is known to be the preferred osmoprotectant in many bacteria, and glycine betaine accumulation has also been correlated with increased cold tolerance. Trehalose is often a minor osmoprotectant in bacteria and it is a major determinant for desiccation tolerance in many so-called anhydrobiotic organisms such as baker's yeast (Saccharomyces cerevisiae). Escherichia coli has two pathways for synthesis of these protective molecules; i.e., a two-step conversion of UDP-glucose and glucose-6-phosphate to trehalose and a two-step oxidation of externally-supplied choline to glycine betaine. The genes governing the choline-to-glycine betaine pathway have been studied in E. coli and several other bacteria and higher plants. The genes governing UDP-glucose-dependent trehalose synthesis have been studied in E. coli and S. cerevisiae. Because of their well-documented function in stress protection, glycine betaine and trehalose have been identified as targets for metabolic engineering of stress tolerance. Examples of this experimental approach include the expression of the E. coli betA and Arthrobacter globiformis codA genes for glycine betaine synthesis in plants and distantly related bacteria, and the expression of the E. coli otsA and yeast TPS1 genes for trehalose synthesis in plants. The published data show that glycine betaine synthesis protects transgenic plants and phototrophic bacteria against stress caused by salt and cold. Trehalose synthesis has been reported to confer increased drought tolerance in transgenic plants, but it causes negative side effects which is of concern. Thus, the much-used model organism E. coli has now become a gene resource for metabolic engineering of stress tolerance.