Phytases hydrolyze phytic acid to less phosphorylated myo-inositol derivatives and inorganic phosphate. A thermostable phytase is of great value in applications for improving phosphate and metal ion availability in animal feed, and thereby reducing phosphate pollution to the environment. Here, we report a new folding architecture of a six-bladed propeller for phosphatase activity revealed by the 2.1 A crystal structures of a novel, thermostable phytase determined in both the partially and fully Ca2+-loaded states. Binding of two calcium ions to high-affinity calcium binding sites results in a dramatic increase in thermostability (by as much as approximately 30 degrees C in melting temperature) by joining loop segments remote in the amino acid sequence. Binding of three additional calcium ions to low-affinity calcium binding sites at the top of the molecule turns on the catalytic activity of the enzyme by converting the highly negatively charged cleft into a favorable environment for the binding of phytate.