Closely linked repeats of a Drosophila P transposon carrying a white transgene were found to cause white variegation. Arrays of three or more transgenes produced phenotypes similar to classical heterochromatin-induced position-effect variegation (PEV), and these phenotypes were modified by known modifiers of PEV. This effect on the repeated transgenes was much stronger for a site near centric heterochromatin than it was for a medial site, and it strengthened with increasing copy number. Differences between variegated phenotypes could be accounted for if different topological structures were generated by pairing between closely linked repeat sequences. We propose that pairing of repeats underlies heterochromatin formation and is responsible for diverse gene silencing phenomena in animals and plants.