Magnesium plays a special role in biochemistry because of its ability to coordinate six oxygen atoms efficiently in its first coordination shell. Such oxygen atoms may be part of one or two charged oxyanions, which means that Mg2+ can, for instance, tie together two different phosphate groups that are located at distance from each other in a macromolecule, and in this way be responsible for the folding of molecules like RNA. This property of Mg2+ also helps the stabilization of diphosphate and triphosphate groups of nucleotides, as well as promoting the condensation of orthophosphate to oligophosphates, like pyrophosphate and trimetaphosphate. Borates, on the other hand, are known to promote the formation of nucleobases and carbohydrates, ribose in particular, which is yet another constituent of nucleotides. The oldest borate minerals that we find on Earth today are magnesium borates. Dissolved borate stabilizes pentose sugars by forming complexes with cis-hydroxyl groups. In the furanose form of ribose, the preferential binding occurs to the 2 and 3 carbon, leaving the 5 carbon free for phosphorylation. The central role of Mg2+ in the function of ribozymes and its ‘archaic’ position in ribosomes, and the fact that magnesium generally has coordination properties different from other cations, suggests that the inorganic chemistry of magnesium had a key position in the first chemical processes leading to the origin and early evolution of life.