RNA molecules fold into complex structures that allow them to perform specific functions. To compensate the relative lack of diversity of functional groups within nucleotides, metal ions work as crucial co-factors. In addition, shifted pKas are observed in RNA, enabling acid–base reactions at ambient pH. The central catalytic domain 5 (D5) hairpin of the Azotobacter vinelandii group II intron undergoes both metal ion binding and pH dependence, presumably playing an important functional role in the ribozyme's reaction. By NMR spectroscopy we have here characterized the metal ion binding sites and affinities for the hairpin's internal G-A mismatch, bulge, and pentaloop. The influence of Mg(II) and pH on the local conformation of the catalytically crucial region is also explored by fluorescence spectroscopy.