In both sexes, the Drosophila genital disc comprises three segmental primordia: the female genital primordium derived from segment A8, the male genital primordium derived from segment A9 and the anal primordium derived from segments A10-11. Each segmental primordium has an anterior (A) and a posterior (P) compartment, the P cells of the three segments being contiguous at the lateral edges of the disc. We show that Hedgehog (Hh) expressed in the P compartment differentially signals A cells at the AP compartment border and A cells at the segmental border. As in the wing imaginal disc, cell lineage restriction of the AP compartment border is defined by Hh signalling. There is also a lineage restriction barrier at the segmental borders, even though the P compartment cells of the three segments converge in the lateral areas of the disc. Lineage restriction between segments A9 and A10-11 depends on factors other than the Hh, En and Hox genes. The segmental borders, however, can be permeable to some morphogenetic signals. Furthermore, cell ablation experiments show that the presence of all primordia (either the anal or the genital primordium) during development are required for normal development of genital disc. Collectively, these findings suggest that interaction between segmental primordia is required for the normal development of the genital disc.