Transposable elements are emerging as an important source of cis-acting regulatory sequences and epigenetic marks that could influence gene expression. However, few studies have dissected the role of specific transposable element insertions on gene regulation. Bari-Jheh is a natural transposon that mediates resistance to oxidative stress by adding cis-regulatory sequences. In this work, we integrated publicly available data with chromatin immunoprecipitation and immune response assays to get a more comprehensive picture of Bari-Jheh molecular and functional effects. We showed that Bari-Jheh is associated with H3K27me3 enrichment, which is consistent with expression changes in adjacent genes. We further showed that stress affects the histone marks introduced by Bari-Jheh, which correlates with further expression changes. Finally, we found that flies with Bari-Jheh, which are resistant to oxidative stress, are also more tolerant to bacterial infection. We conclude that Bari-Jheh influences gene expression and enables stress response through two different mechanisms, by adding cis-regulatory sequences and by adding histone marks, leading to changes in two ecologically relevant phenotypes.