RNA transcribed from clustered regularly interspaced short palindromic repeats (CRISPRs) protects many prokaryotes from invasion by foreign DNA such as viruses, conjugative plasmids, and transposable elements. Cas3 (CRISPR-associated protein 3) is essential for this CRISPR protection and is thought to mediate cleavage of the foreign DNA through its N-terminal histidine-aspartate (HD) domain. We report here the 1.8 Å crystal structure of the HD domain of Cas3 from Thermus thermophilus HB8. Structural and biochemical studies predict that this enzyme binds two metal ions at its active site. We also demonstrate that the single-stranded DNA endonuclease activity of this T. thermophilus domain is activated not by magnesium but by transition metal ions such as manganese and nickel. Structure-guided mutagenesis confirms the importance of the metal-binding residues for the nuclease activity and identifies other active site residues. Overall, these results provide a framework for understanding the role of Cas3 in the CRISPR system.