The Drosophila ecdysone receptor (EcR/Usp) is thought to activate or repress gene transcription depending on the presence or absence, respectively, of the hormone ecdysone. Unexpectedly, we found an alternative mechanism at work in salivary glands during the ecdysone-dependent transition from larvae to pupae. In the absense of ecdysone, both ecdysone receptor subunits localize to the cytoplasm, and the heme-binding nuclear receptor E75A replaces EcR/Usp at common target sequences in several genes. During the larval-pupal transition, a switch from gene activation by EcR/Usp to gene repression by E75A is triggered by a decrease in ecdysone concentration and by direct repression of the EcR gene by E75A. Additional control is provided by developmentally timed modulation of E75A activity by NO, which inhibits recruitment of the corepressor SMRTER. These results suggest a mechanism for sequential modulation of gene expression during development by competing nuclear receptors and their effector molecules, ecdysone and NO.