RNA thermometers are translational control elements that regulate the expression of bacterial heat shock and virulence genes. They fold into complex secondary structures that block translation at low temperatures. A temperature increase releases the ribosome binding site and thus permits translation initiation. In fourU-type RNA thermometers, the AGGA sequence of the SD region is paired with four consecutive uridines. We investigated the melting points of the wild-type and mutant sequences. It was decreased by 5°C when a stabilizing GC basepair was exchanged by an AU pair or increased by 11°C when an internal AG mismatch was converted to a GC pair, respectively. Stabilized or destabilized RNA structures are directly correlated with decreased or increased in vivo gene expression, respectively. Mg2+ also affected the melting point of the fourU thermometer. Variations of the Mg2+ concentration in the physiological range between 1 and 2 mM translated into a 2.8°C shift of the melting point. Thus, Mg2+ binding to the hairpin RNA is regulatory relevant. Applying three different NMR techniques, two Mg2+ binding sites were found in the hairpin structure. One of these binding sites could be identified as outer sphere binding site that is located within the fourU motif. Binding of the two Mg2+ ions exhibits a positive cooperativity with a Hill coefficient of 1.47. Free energy values delta G for Mg2+ binding determined by NMR are in agreement with data determined from CD measurements. Physiological Mg2+ concentrations reduce enthalpy and entropy values of uncorrelated base pair opening processes for almost all nucleobases.