Carbonic anhydrase, a zinc enzyme found in organisms from all kingdoms, catalyses the reversible hydration of carbon dioxide and is used for inorganic carbon acquisition by phytoplankton. In the oceans, where zinc is nearly depleted, diatoms use cadmium as a catalytic metal atom in cadmium carbonic anhydrase (CDCA). Here we report the crystal structures of CDCA in four distinct forms: cadmium-bound, zinc-bound, metal-free and acetate-bound. Despite lack of sequence homology, CDCA is a structural mimic of a functional beta-carbonic anhydrase dimer, with striking similarity in the spatial organization of the active site residues. CDCA readily exchanges cadmium and zinc at its active site--an apparently unique adaptation to oceanic life that is explained by a stable opening of the metal coordinating site in the absence of metal. Given the central role of diatoms in exporting carbon to the deep sea, their use of cadmium in an enzyme critical for carbon acquisition establishes a remarkable link between the global cycles of cadmium and carbon.