Segmentation genes provide the signals for the activation and regulation of homeotic genes in Drosophila but cannot maintain the resulting pattern of expression because their activity ceases halfway through embryogenesis. Maintenance of the pattern is due to the Polycomb group of genes (Pc-G) and the trithorax group of genes (trx-G), responsible for the persistence of the active or repressed state of homeotic genes. We have identified a regulatory element in the Ubx gene that responds to Pc-G and trx-G genes. Transposons carrying this element create new binding sites for Pc-G products in the polytene chromosomes. This Pc-G maintenance element (PRE), establishes a repressive complex that keeps enhancers repressed in cells in which they were originally repressed and maintains this state through many cell divisions. The trx-G products stimulate the expression of enhancers in cells in which they were originally active. This mechanism is responsible for the correct regulation of imaginal disc enhancers, which lack themselves antero-posterior positional information. The PRE also causes severe variegation of the mini-white gene present in the transposon, a phenomenon very similar to heterochromatic position-effect variegation. The significance of this mechanism for homeotic gene regulation is discussed.