Mg
2+ and Mn
2+ ions are critical to the functioning of phosphoryl transfer enzymes, such as restrictionendonucleases. Although these ions play similar roles in the chemical steps, they govern substrate specificityvia modulating sequence discrimination by up to a factor of 10
5 with Mg
2+ and only up to a factor of 10 withMn
2+. To explain whether such d
iversity originates in fundamental differences in the electronic structures ofthe nucleobase-hydrated-metal ion complexes, structures and interaction energies were determined at thedensity functional (DFT) and second-order M
ller-Plesset (MP2) levels of theory. Although both metal ionsfavor identical binding sites, Mn
2+ complexes exhibit greater distortions from the ideal octahedral geometryand larger variability than the corresponding Mg
2+ systems. In inner-shell complexes, with direct contactbetween the metal and the nucleobase, Mg
2+ is preferred over Mn
2+ in the gas phase, due primarily to
nonelectrostatic effects. The interaction energies of the two metal ions are more similar in the outer-shellcomplexes, likely due to reduced charge transfer between the hydrated metal ion and the base moieties. Inclusionof solvation effects can amplify the relat
ive nucleobase preferences of Mg
2+ and Mn
2+, indicating that bulkhydration modulates the balance between electrostatic and nonelectrostatic terms. In most cases, the basesubstitutions in solution are facilitated more by Mn
2+ than by Mg
2+. Electrostatic properties of the environmentwere demonstrated to have a major influence on the nucleobase preferences of the two metal ions. Overall,quantum chemical calculations suggest that the contrasting select
ivity of Mg
2+ and Mn
2+ cofactors towardnucleobases der
ives from the larger flexibility of the Mn
2+ complexes accompanied by the excess
ive polarizationand charge-transfer effects as well as less favorable solvation.