The flavoenzyme uridine 5'-diphosphate (UDP)-galactopyranose mutase (UGM) catalyzes the interconversion of UDP-galactopyranose (UDP-Galp) and UDP-galactofuranose (UDP-Galf). The latter is an essential precursor to the cell wall arabinogalactan of Mycobacterium tuberculosis. The catalytic mechanism for this enzyme had not been elucidated. Here, we provide evidence for a mechanism in which the flavin cofactor assumes a new role. Specifically, the N5 of the reduced anionic flavin cofactor captures the anomeric position of the galactose residue with release of UDP. Interconversion of the isomers occurs via a flavin-derived iminium ion. To trap this putative intermediate, we treated UGM with radiolabeled UDP-Galp and sodium cyanoborohydride; a radiolabeled flavin-galactose adduct was obtained. Ultraviolet-visible spectroscopy and mass spectrometry indicate that this product is an N5-alkyl flavin. We anticipate that the clarification of the catalytic mechanism for UGM will facilitate the development of anti-mycobacterial agents.