RNA molecules in monovalent salt solutions generally adopt a set of partially folded conformations containing only secondary structure, the intermediate or I state. Addition of Mg2+ strongly stabilizes the native tertiary structure (N state) relative to the I state. In this paper, a combination of experimental and computational approaches is used to estimate the free energy of the interaction of Mg2+ with partially folded I state RNAs and to consider the possibility that Mg2+ favors "compaction" of the I state to a set of conformations with a higher average charge density. A sequence variant with a drastically destabilized tertiary structure was used as a mimic of I state RNA; as measured by small-angle X-ray scattering, it adopted a progressively more compact conformation over a wide Mg2+ concentration range. Average free energies of the interaction of Mg2+ with the I state mimic were obtained by a fluorescence titration method. To interpret these experimental data further, we generated molecular models of the I state and used them in calculations with the nonlinear Poisson-Boltzmann equation to estimate the change in Mg2+-RNA interaction free energy as the average I state dimensions decrease from expanded to compact. The same models were also used to reproduce quantitatively the experimental difference in excess Mg2+ between N and I states. On the basis of these experiments and calculations, I state compaction appears to enhance Mg2+-I state interaction free energies by 10-20%, but this enhancement is at most 5% of the overall Mg 2+-associated stabilization free energy for this rRNA fragment.