Purine riboswitches are RNA regulatory elements that control purine metabolism in response to intracellular concentrations of the purine ligands. Conformational changes of the guanine riboswitch aptamer domain induced by guanine binding lead to transcriptional regulation of genes involved in guanine biosynthesis. The guanine riboswitch aptamer domain has three RNA helices designated P1, P2, and P3. An overall model for the Mg(2+)- and guanine-dependent relative orientations and dynamics of P1, P2, and P3 has not been reported, and the conformational role of guanine under physiologically relevant conditions has not been fully elucidated. In this study, an ensemble and single-molecule fluorescence resonance energy transfer (FRET) study was performed on three orthogonally labeled variants of the xpt guanine riboswitch aptamer domain. The combined FRET data support a model in which the unfolded state of the aptamer domain has a highly dynamic P2 helix that switches rapidly between two orientations relative to nondynamic P1 and P3. At <<1 mM Mg(2+) (in the presence of a saturating level of guanine) or >or=1 mM Mg(2+) (in the absence of guanine), the riboswitch starts to adopt a folded conformation in which loop-loop interactions lock P2 and P3 into place. At >5 mM Mg(2+), further compaction occurs in which P1 more closely approaches P3. Our data help to explain the biological role of guanine as stabilizing the globally folded aptamer domain conformation at physiologically relevant Mg(2+) concentrations (<or=1 mM), whereas in the absence of guanine, much higher Mg(2+) concentrations are required to induce this folding event.