Trehalose is present as a free disaccharide in the cytoplasm of mycobacteria and as a component of cell-wall glycolipids implicated in tissue damage associated with mycobacterial infection. To obtain an overview of trehalose metabolism, we analysed data from the Mycobacterium tuberculosis genome project and identified ORFs with homology to genes encoding enzymes from three trehalose biosynthesis pathways previously characterized in other bacteria. Functional assays using mycobacterial extracts and recombinant enzymes derived from these ORFs demonstrated that mycobacteria can produce trehalose from glucose 6-phosphate and UDP-glucose (the OtsA-OtsB pathway) from glycogen-like alpha(1-->4)-linked glucose polymers (the TreY-TreZ pathway) and from maltose (the TreS pathway). Each of the pathways was found to be active in both rapid-growing Mycobacterium smegmatis and slow-growing Mycobacterium bovis BCG. The presence of a disrupted treZ gene in Mycobacterium leprae suggests that this pathway is not functional in this organism. The presence of multiple biosynthetic pathways indicates that trehalose plays an important role in mycobacterial physiology.