Analyses of transgene silencing phenomena in plants and other organisms have revealed the existence of epigenetic silencing mechanisms that are based on recognition of nucleic acid sequence homology at either the DNA or RNA level. Common triggers of homology-dependent gene silencing include inverted DNA repeats and double-stranded RNA, a versatile silencing molecule that can induce both degradation of homologous RNA in the cytoplasm and methylation of homologous DNA sequences in the nucleus. Inverted repeats might be frequently associated with silencing because they can potentially interact in cis and in trans to trigger DNA methylation via homologous DNA pairing, or they can be transcribed to produce double-stranded RNA. Homology-dependent gene silencing mechanisms are ideally suited for countering natural parasitic sequences such as transposable elements and viruses, which are usually present in multiple copies and/or produce double-stranded RNA during replication. These silencing mechanisms can thus be regarded as host defense strategies to foreign or invasive nucleic acids. The high content of transposable elements and, in some cases, endogenous viruses in many plant genomes suggests that host defenses do not always prevail over invasive sequences. During evolution, slightly faulty genome defense responses probably allowed transposable elements and viral sequences to accumulate gradually in host chromosomes and to invade host genes. Possible beneficial consequences of this "foreign" DNA buildup include the establishment of genome defense-derived epigenetic control mechanisms for regulating host gene expression and acquired hereditary immunity to some viruses.