We have determined the relative affinities in solution for various metals which bind to the lone calcium-binding site of the D-galactose-binding protein which resembles the EF-hand loop. In order of affinity the metals are: Ca2+ approximately Tb3+ approximately Pb2+ greater than Cd2+ greater than Sr2+ greater than Mg2+ much greater than Ba2+. The binding affinity for calcium (Kd = 2 microM) and the slow off-rate determined for terbium (1 x 10(-3) s-1) and that the metal-binding site is unperturbed by sugar binding argue for a structural role. Furthermore, we have crystallographically refined the structure of the binding protein with the calcium substituted by cadmium, compared it with the calcium-bound structure, and found them to be identical. The results of these structural and solution studies support the hypothesis that for a given metal-binding loop, cation hydration energy, size, and charge are major factors contributing to binding affinity.