We have developed a novel technique, named DamID, for the identification of DNA loci that interact in vivo with specific nuclear proteins in eukaryotes. By tethering Escherichia coli DNA adenine methyltransferase (Dam) to a chromatin protein, Dam can be targeted in vivo to native binding sites of this protein, resulting in local DNA methylation. Sites of methylation can subsequently be mapped using methylation-specific restriction enzymes or antibodies. We demonstrate the successful application of DamID both in Drosophila cell cultures and in whole flies. When Dam is tethered to the DNA-binding domain of GAL4, targeted methylation is limited to a region of a few kilobases surrounding a GAL4 binding sequence. Using DamID, we identified a number of expected and unexpected target loci for Drosophila heterochromatin protein 1. DamID has potential for genome-wide mapping of in vivo targets of chromatin proteins in various eukaryotes.