The active sites of guanylyl and adenylyl cyclases are closely related. The crystal structure of adenylyl cyclase and modeling studies suggest that specificity for ATP or GTP is dictated in part by a few amino acid residues, invariant in each family, that interact with the purine ring of the substrate. By exchanging these residues between guanylyl cyclase and adenylyl cyclase, we can completely change the nucleotide specificity of guanylyl cyclase and convert adenylyl cyclase into a nonselective purine nucleotide cyclase. The activities of these mutant enzymes remain fully responsive to their respective stimulators, sodium nitroprusside and G(s)α. The specificity of nucleotide inhibitors of guanylyl and adenylyl cyclases that do not act competitively with respect to substrate are similarly altered, indicative of their action at the active sites of these enzymes.