The Mycobacterium tuberculosis 30 kDa major secretory protein (antigen 85B) is the most abundant protein exported by M. tuberculosis, as well as a potent immunoprotective antigen and a leading drug target. A mycolyl transferase of 285 residues, it is closely related to two other mycolyl transferases, each of molecular mass 32 kDa: antigen 85A and antigen 85C. All three catalyze transfer of the fatty acid mycolate from one trehalose monomycolate to another, resulting in trehalose dimycolate and free trehalose, thus helping to build the bacterial cell wall. We have determined two crystal structures of M. tuberculosis antigen 85B (ag85B), initially by molecular replacement using antigen 85C as a probe. The apo ag85B model is refined against 1.8 A data, to an R-factor of 0.196 (R(free) is 0.276), and includes all residues except the N-terminal Phe. The active site immobilizes a molecule of the cryoprotectant 2-methyl-2,4-pentanediol. Crystal growth with addition of trehalose resulted in a second ag85B crystal structure (1.9 A resolution; R-factor is 0.195; R(free) is 0.285). Trehalose binds in two sites at opposite ends of the active-site cleft. In our proposed mechanism model, the trehalose at the active site Ser126 represents the trehalose liberated by temporary esterification of Ser126, while the other trehalose represents the incoming trehalose monomycolate just prior to swinging over to the first trehalose site to displace the mycolate from its serine ester. Our proposed interfacial mechanism minimizes aqueous exposure of the apolar mycolates. Based on the trehalose-bound structure, we suggest a new class of antituberculous drugs, made by connecting two trehalose molecules by an amphipathic linker.