Homeotic genes function in blocks of cells along the body axis to specify diverse developmental pathways. Among the Drosophila homeotic genes, only one is known to be expressed in the endoderm. We show here that expression of this gene, labial (lab), coincides with copper cells, highly specialized cells of the larval midgut. lab is strictly required for copper cell formation, a requirement that starts in the embryo and extends through larval stages. This implies a function of lab not only in the determination and differentiation of copper cells, but also in the maintenance of their differentiated state. Ectopic expression of lab during embryogenesis reprograms other midgut cells within and outside the lab domain to become copper cell-like. Thus, lab functions in the larval midgut to specify a single cell type.