SummaryInfectious diseases drive the evolution of wild plants and impact yield in crop plants. Like animals, plants can sense biotic threats via conserved pathogen-associated patterns (PAMPs). Since an overly robust immune response can harm plants, understanding the mechanisms for tuning defense responses to the appropriate level is vital as we endeavor to develop pathogen-resistant crops. In this paper, we studied the Arabidopsis pattern recognition receptor (PRR) EFR, which senses bacterial EF-Tu. An inverted-repeat transposon (Ea-IR) betweenEFRand the neighboringXI-klocus controls local chromatin organization, promoting the formation of a repressive chromatin loop. Upon pathogen infection, the chromatin landscape aroundEFRandXl-kdynamically changes to allow for increasedEFRtranscription. Chromatin opening facilitates the passage of RNA polymerase II across the neighboringXI-kgene termination site, leading to a longerXI-ktranscript that includesEa-IRsequences. Dicer-like (DCL) enzymes process the longer Xl-k transcript into small RNAs (sRNAs), which reset chromatin topology to a repressive state, attenuating, in turn, the immune response, reminiscent of attenuation of receptor signaling in other systems. From an evolutionary point of view, we found that natural Arabidopsis accessions missingEa-IRhave a constitutive "EFR-open" chromatin configuration that correlates with higher basal EFR levels and higher background resistance to pathogens. Collectively, our study offers evidence for a scenario in which a transposon, chromatin organization, and gene expression interact to fine-tune immune responses, both during the course of infection and in the course of evolution. Similar gene-associated IRs in crops could provide valuable non-coding targets for genome editing or assisted plant breeding programs.