Adenylate and guanylate cyclases, having different but related substrates, are a paradigm for the study of substrate discrimination. A prokaryotic adenylate cyclase gene, phylogenetically related to eukaryotic counterparts, was screened for mutants remodelling the enzyme's specificity. In a first step, a mutant was selected displaying a significant level of guanylate cyclase activity. This was due to a point mutation destroying most of the adenylate cyclase activity. A second selection step restored most of the original activity. This resulted from an additional mutation in the same region, thus permitting the first identification of a functional domain in adenylate and guanylate cyclases.