The homeo box prepattern genes araucan (ara) and caupolican (caup) are coexpressed near the anterior-posterior (AP) compartment border of the developing Drosophila wing in two symmetrical patches located one at each side of the dorsoventral (DV) compartment border. ara-caup expression at these patches is necessary for the specification of the prospective vein L3 and associated sensory organs through the transcriptional activation, in smaller overlapping domains, of rhomboid/veinlet and the proneural genes achaete and scute. We show that ara-caup expression at those patches is mediated by the Hedgehog signal through its induction of high levels of Cubitus interruptus (Ci) protein in anterior cells near to the AP compartment border. The high levels of Ci activate decapentaplegic (dpp) expression, and, together, Ci and Dpp positively control ara-caup. The posterior border of the patches is apparently defined by repression by engrailed. Wingless accumulation at the DV border sets, also by repression, the gap between the two patches. Thus, ara and caup integrate the inputs of genes effecting the primary subdivisions of the wing disc into compartments to define two smaller territories. These in turn help create the even smaller domains of rhomboid/veinlet and achaete-scute expression.