Patterns of DNA methylation in animal genomes are known to vary from an apparent absence of modified bases, via methylation of a minor fraction of the genome, to genome-wide methylation. Representative genomes from 10 invertebrate phyla comprise predominantly nonmethylated DNA and (usually but not always) a minor fraction of methylated DNA. In contrast, all 27 vertebrate genomes that have been examined display genome-wide methylation. Our studies of chordate genomes suggest that the transition from fractional to global methylation occurred close to the origin of vertebrates, as amphioxus has a typically invertebrate methylation pattern whereas primitive vertebrates (hagfish and lamprey) have patterns that are typical of vertebrates. Surprisingly, methylation of genes preceded this transition, as many invertebrate genes have turned out to be heavily methylated. Methylation does not preferentially affect genes whose expression is highly regulated, as several housekeeping genes are found in the heavily methylated fraction whereas several genes expressed in a tissue-specific manner are in the nonmethylated fraction.