Food processing and refining has dramatically changed the human diet, but little is known about whether this affected the evolution of enzymes in human microbiota. We present evidence that glycoside hydrolase family 70 (GH70) glucansucrases from lactobacilli, synthesizing α-glucan-type extracellular polysaccharides from sucrose, likely evolved from GH13 starch-acting α-amylases, via GH70 4,6-α-glucanotransferases. The crystal structure of a 4,6-α-glucanotransferase explains the mode of action and unique product specificity of these enzymes. While the α-amylase substrate-binding scaffold is retained, active-site loops adapted to favor transglycosylation over hydrolysis; the structure also gives clues as to how 4,6-α-glucanotransferases may h...