Eukaryotic chromatin is separated into functional domains differentiated by post-translational histone modifications, histone variants and DNA methylation. Methylation is associated with repression of transcriptional initiation in plants and animals, and is frequently found in transposable elements. Proper methylation patterns are crucial for eukaryotic development, and aberrant methylation-induced silencing of tumour suppressor genes is a common feature of human cancer. In contrast to methylation, the histone variant H2A.Z is preferentially deposited by the Swr1 ATPase complex near 5' ends of genes where it promotes transcriptional competence. How DNA methylation and H2A.Z influence transcription remains largely unknown. Here we show that in the plant Arabidopsis thaliana regions of DNA methylation are quantitatively deficient in H2A.Z. Exclusion of H2A.Z is seen at sites of DNA methylation in the bodies of actively transcribed genes and in methylated transposons. Mutation of the MET1 DNA methyltransferase, which causes both losses and gains of DNA methylation, engenders opposite changes (gains and losses) in H2A.Z deposition, whereas mutation of the PIE1 subunit of the Swr1 complex that deposits H2A.Z leads to genome-wide hypermethylation. Our findings indicate that DNA methylation can influence chromatin structure and effect gene silencing by excluding H2A.Z, and that H2A.Z protects genes from DNA methylation.