Thermoanaerobacterium thermosulfurigenes cyclodextrin glucanotransferase primarily catalyses the formation of cyclic alpha-(1,4)-linked oligosaccharides (cyclodextrins) from starch. This enzyme also possesses unusually high hydrolytic activity as a side reaction, thought to be due to partial retention of ancestral enzyme function. This side reaction is undesirable, since it produces short saccharides that are responsible for the breakdown of the cyclodextrins formed, thus limiting the yield of cyclodextrins produced. To reduce the competing hydrolysis reaction, while maintaining the cyclization activity, we applied directed evolution, introducing random mutations throughout the cgt gene by error-prone PCR. Mutations in two residues, Ser-77 and Trp-239, on the outer region of the active site, lowered the hydrolytic activity up to 15-fold with retention of cyclization activity. In contrast, mutations within the active site could not lower hydrolytic rates, indicating an evolutionary optimized role for cyclodextrin formation by residues within this region. The crystal structure of the most effective mutant, S77P, showed no alterations to the peptide backbone. However, subtle conformational changes to the side chains of active-site residues had occurred, which may explain the increased cyclization/hydrolysis ratio. This indicates that secondary effects of mutations located on the outer regions of the catalytic site are required to lower the rates of competing side reactions, while maintaining the primary catalytic function. Subsequent functional analysis of various glucanotransferases from the superfamily of glycoside hydrolases also suggests a gradual evolutionary progression of these enzymes from a common 'intermediate-like' ancestor towards specific transglycosylation activity.