Ketopantoate reductase (KPR, EC 1.1.1.169) catalyzes the NADPH-dependent reduction of ketopantoate to pantoate, an essential step for the biosynthesis of pantothenate (vitamin B.). Inhibitors of the enzymes of this pathway have been proposed as potential antibiotics or herbicides. Here we present the crystal structure of Escherichia coli KPR in a precatalytic ternary complex with NADP(+) and pantoate bound, solved to 2.3 angstrom of resolution. The asymmetric unit contains two protein molecules, each in a ternary complex; however, one is in a more closed conformation than the other. A hinge bending between the N- and C-terminal domains is observed, which triggers the switch of the essential Lys(176) to form a key hydrogen bond with the C2 hydroxyl of pantoate. Pantoate forms additional interactions with conserved residues Ser(244), Asn(98), and Asn(180) and with two conservatively varied residues, Asn(194) and Asn(241). The steady-state kinetics of active site mutants R31A, K72A, N98A, K176A, S244A, and E256A implicate Asn(98) as well as Lys(176) and Glu(256) in the catalytic mechanism. Isothermal titration calorimetry studies with these mutants further demonstrate the importance of Ser244 for substrate binding and of Arg(31) and Lys(72) for cofactor binding. Further calorimetric studies show that KPR discriminates binding of ketopantoate against pantoate only with NADPH bound. This work provides insights into the roles of active site residues and conformational changes in substrate recognition and catalysis, leading to the proposal of a detailed molecular mechanism for KPR activity.