Human phosphoserine phosphatase (HPSP), specific for D- and L- phosphoserine, has been identified in all human tissues. HPSP is a Mg(2+)-dependent phosphoserine phosphatase. The three dimensional structure of HPSP reveals the structural and functional role of the divalent cation in the active site of phosphatases. In particular, the complex structures reveal that the open-closed environmental change of the active site, generated by local rearrangement of the alpha-helical bundle domain, is important for the substrate recognition and hydrolysis.