Metabolite-sensing mRNAs, or "riboswitches," specifically interact with small ligands and direct expression of the genes involved in their metabolism. Riboswitches contain sensing "aptamer" modules, capable of ligand-induced structural changes, and downstream regions, harboring expression-controlling elements. We report the crystal structures of the add A-riboswitch and xpt G-riboswitch aptamer modules that distinguish between bound adenine and guanine with exquisite specificity and modulate expression of two different sets of genes. The riboswitches form tuning fork-like architectures, in which the prongs are held in parallel through hairpin loop interactions, and the internal bubble zippers up to form the purine binding pocket. The bound purines are held by hydrogen bonding interactions involving conserved nucleotides along their entire periphery. Recognition specificity is associated with Watson-Crick pairing of the encapsulated adenine and guanine ligands with uridine and cytosine, respectively.