SUMMARY The Drosophila sex comb (SC) has been hailed as a powerful tool for integrative studies in development, evolution, and behavior, but its ontogeny is poorly understood, even in the model organism Drosophila melanogaster. Using 4D live imaging and other techniques, we carried out a detailed analysis of the cellular events that take place during the development of the SC. We showed that the comb and other contiguous bristle formations assemble from noncontiguous precursor cells, which join together through intercalation. Most of the rotation of the SC (which has a longitudinal orientation in D. melanogaster but is initially transverse) occurs after this stage, when the structure is a single unit. We have provided evidence that male-specific convergent extension through cell rearrangement is responsible for both this rotation and another sexually dimorphic bristle trait. Contiguous bristle formations act as barriers to cell movement within the epithelium, and we demonstrated that a particularly rapid rotation of the proximal region of the comb is associated with the presence of a constricted area between a portion of the SC and a transverse row of contiguous bristle precursors. Our results suggest that the cell dynamics in the neighborhood of the SC may have biased its evolution.