Enzymatic cleavage of the glycosidic bond yields products in which the anomeric configuration is either retained or inverted. Each mechanism reflects the dispositions of the enzyme functional groups; a facet of which is essentially conserved in 113 glycoside hydrolase (GH) families. We show that family GH97 has diverged significantly, as it contains both inverting and retaining alpha-glycosidases. This reflects evolution of the active center; a glutamate acts as a general base in inverting members, exemplified by Bacteroides thetaiotaomicron alpha-glucosidase BtGH97a, whereas an aspartate likely acts as a nucleophile in retaining members. The structure of BtGH97a and its complexes with inhibitors, coupled to kinetic analysis of active-site variants, reveals an unusual calcium ion dependence. 1H NMR analysis shows an inversion mechanism for BtGH97a, whereas another GH97 enzyme from B. thetaiotaomicron, BtGH97b, functions as a retaining alpha-galactosidase.