Transcriptional repression is essential for establishing localized patterns of gene expression during Drosophila embryogenesis. Several mechanisms of repression have been proposed, including competition, quenching and direct repression of the transcription complex. Previous studies suggest that the knirps orphan receptor (kni) may repress transcription via competition, and exclude the binding of the bicoid (bcd) activator to an overlapping site in a target promoter. Here we present evidence that kni can quench, or locally inhibit, upstream activators within a heterologous enhancer in transgenic embryos. The range of kni repression is approximately 50-100 bp, so that neighboring enhancers in a modular promoter are free to interact with the transcription complex (enhancer autonomy). However, kni can also repress the transcription complex when bound in promoter-proximal regions. In this position, kni functions as a dominant repressor and blocks multiple enhancers in a modular promoter. Our studies suggest that short-range repression represents a flexible form of gene regulation, exhibiting enhancer- or promoter-specific effects depending on the location of repressor binding sites.