Mutational analysis of cap'n'collar (cnc), a bZIP transcription factor closely related to the mammalian erythroid factor NF-E2 (p45), indicates that it acts as a segment-specific selector gene controlling the identity of two cephalic segments. In the mandibular segment, cnc has a classical homeotic effect: mandibular structures are missing in cnc mutant larvae and replaced with duplicate maxillary structures. We propose that cnc functions in combination with the homeotic gene Deformed to specify mandibular development. Labral structures are also missing in cnc mutant larvae, where a distinct labral primordia is not properly maintained in the developing foregut, as observed by the failure to maintain and elaborate patterns of labral-specific segment polarity gene expression. Instead, the labral primordium fuses with the esophageal primordium to contribute to formation of the esophagus. The role of cnc in labral development is reciprocal to the role of homeotic gene forkhead, which has an identical function in the maintenance of the esophageal primordium. This role of homeotic selector genes for the segment-specific maintenance of segment polarity gene expression is a unique feature of segmentation in the preoral head region of Drosophila.