Type II restriction endonucleases (ENases) have served as models for understanding the enzyme-based site-specific cleavage of DNA. Using the knowledge gained from the available crystal structures, a number of attempts have been made to alter the specificity of ENases by mutagenesis. The negative results of these experiments argue that the three-dimensional structure of DNA-ENase complexes does not provide enough information to enable us to understand the interactions between DNA and ENases in detail. This conclusion calls for alternative approaches to the study of structure-function relationships related to the specificity of ENases. Comparative analysis of ENases that manifest divergent substrate specificities, but at the same time are evolutionarily related to each other, may be helpful in this respect. The success of such studies depends to a great extent on the availability of related ENases that recognise partially overlapping nucleotide sequences (e.g. sets of enzymes that bind to recognition sites of increasing length). In this study we report the cloning and sequence analysis of genes for three Type IIS restriction-modification (RM) systems. The genes encoding the ENases Alw26I, Eco31I and Esp3I (whose recognition sequences are 5'-GTCTC-3', 5'-GGTCTC-3' and 5'-CGTCTC-3', respectively) and their accompanying methyltransferases (MTases) have been cloned and the deduced amino acid sequences of their products have been compared. In pairwise comparisons, the degree of sequence identity between Alw26I, Eco31I and Esp3I ENases is higher than that observed hitherto among ENases that recognise partially overlapping nucleotide sequences. The sequences of Alw26I, Eco31I and Esp3I also reveal identical mosaic patterns of sequence conservation, which supports the idea that they are evolutionarily related and suggests that they should show a high level of structural similarity. Thus these ENases represent very attractive models for the study of the molecular basis of variation in the specific recognition of DNA targets. The corresponding MTases are represented by proteins of unusual structural and functional organisation. Both M. Alw26I and M. Esp3I are represented by a single bifunctional protein, which is composed of an m(6)A-MTase domain fused to a m(5)C-MTase domain. In contrast, two separate genes encode the m(6)A-MTase and m(5)C-MTase in the Eco31I RM system. Among the known bacterial m(5)C-MTases, the m(5)C-MTases of M. Alw26I, M. Eco31I and M. Esp3I represent unique examples of the circular permutation of their putative target recognition domains together with the conserved motifs IX and X.