Drosophila homeotic genes encode transcription factors thought to control segmental identity by regulating expression of largely unknown target genes. The formation of the second midgut constriction requires the Ultrabithorax (Ubx) and abdominal-A (abd-A) homeotic genes and decapentaplegic (dpp), a gene encoding a member of the TGF beta family of proteins. We identified a 674 bp enhancer of dpp controlling its expression in the second constriction domain of the visceral mesoderm (parasegment 7). Normal enhancer function requires positive regulation by Ubx and negative regulation by abd-A. This enhancer contains UBX- and ABD-A-binding sites defined in vitro. By generating complementary alterations of the binding sites and the binding specificity of UBX, we show that Ubx directly regulates dpp expression. These regulatory interactions are relevant to normal development, because a transgene made with this enhancer driving a dpp transcription unit rescues the second midgut constriction and larval lethality phenotypes of dpps mutations.