The pannier (pnr) gene encodes a GATA transcription factor and acts in several developmental processes in Drosophila, including embryonic dorsal closure, specification of cardiac cells and bristle determination. We show that pnr is expressed in the mediodorsal parts of thoracic and abdominal segments of embryos, larvae and adult flies. Its activity confers cells with specific adhesion properties that make them immiscible with non-expressing cells. Thus there are two genetic domains in the dorsal region of each segment: a medial (MED) region where pnr is expressed and a lateral (LAT) region where it is not. The homeobox gene iroquois (iro) is expressed in the LAT region. These regions are not formed by separate polyclones of cells, but are defined topographically. We show that ectopic pnr in the wing induces MED thoracic development, indicating that pnr specifies the identity of the MED regions. Correspondingly, when pnr is removed from clones of cells in the MED domain, they sort out and apparently adopt the LAT fate. We propose that (1) the subdivision into MED and LAT regions is a general feature of the Drosophila body plan and (2) pnr is the principal gene responsible for this subdivision. We argue that pnr acts like a classical selector gene but differs in that its expression is not propagated through cell divisions.