The crystal structures of Salmonella typhimurium 4-amino-5-hydroxymethyl-2-methylpyrimidine phosphate kinase (HMPP kinase) and its complex with substrate HMP have been determined. HMPP kinase catalyzes two separate ATP-dependent phosphorylation reactions and is an essential enzyme in the thiamin biosynthetic pathway. HMPP kinase is a homodimer with one active site per monomer and is structurally homologous to members of the ribokinase family. A comparison of the structure of HMPP kinase with other members of the ribokinase family suggests an evolutionary progression. Modeling studies suggest that HMPP kinase catalyzes both of its phosphorylation reactions using in-line displacement mechanisms. We propose that the active site accommodates the two separate reactions by providing two different binding modes for the phosphate group of HMP phosphate.