In both vertebrates and invertebrates, homeotic selector genes confer morphological differences along the antero-posterior axis. However, insect wing development is independent of all homeotic gene functions, reflecting the ground plan of an ancestral pterygote, which bore wings on all segments. Dipteran insects such asDrosophila are characterized by a pair of wings in the mesothoracic segment. In all other segments, wing development is essentially repressed by different homeotic genes, although in the metathorax they are modified into a pair of halteres. This necessitates that during development all homeotic genes are to be maintained in a repressed state in wing imaginal discs. In this report we show that (i) the function of the segment polarity geneengrailed (en) is critical to keep the homeotic selector geneUltrabithorax (Ubx) repressed in wing imaginal discs, (ii) normal levels of En in the posterior compartment of haltere discs, however, are not enough to completely repressUbx, and (iii) the repression ofUbx byen is independent of Hedgehog signalling through which the long-range signalling ofen is mediated during wing development. Finally we provide evidence for a possible mechanism by whichen repressesUbx. On the basis of these results we propose thaten has acquired two independent functions during the evolution of dorsal appendages. In addition to its well-known function of conferring posterior fate and inducing long-range signalling to pattern the developing appendages, it maintains wing fate by keepingUbx repressed.