A series of magnesium carboxylate complexes containing intramolecular NH···O hydrogen bonds were synthesized. Their molecular structures were determined by X-ray analysis. A direct NH···O hydrogen bond to the coordinated oxygen atom elongated the Mg-O bond, while a hydrogen bond to the carbonyl group shortened the Mg-O bond. Double NH···O hydrogen bonds significantly lowered the basicity of the carboxylate anion and prevented coordination to the Mg ion in a trans configuration; however, a cis-dicarboxylate complex was successfully obtained. Strong coordination of water to the Mg(2+) ion stabilizes the weak Mg-carboxylate bond at the trans position. In contrast, a weak Mg-carboxylate bond strengthens the Mg-O(water) bond, probably increasing the acidity. Based on the experimental results and theoretical calculations, a new switching mechanism is proposed. In the proposed mechanism, the acidity of the coordinated water on magnesium is controlled during catalytic hydrolysis in endonuclease.