The Drosophila larval and adult midguts are derived from two populations of endodermal progenitors that separate from each other in the early embryo. As larval midgut cells differentiate into an epithelial layer, adult midgut progenitors (AMPs) remain as small clusters of proliferating, undifferentiated cells attached to the basal surface of the larval gut epithelium. During the first few hours of metamorphosis, AMPs merge into a continuous epithelial tube that overgrows the larval layer and differentiates into the adult midgut; at the same time, the larval midgut degenerates. As shown in this paper, there is a second, transient pupal midgut that develops from the AMPs at the beginning of metamorphosis and that intercalates between the adult and larval midgut epithelia. Cells of the transient pupal midgut form a multilayered tube that exhibits signs of differentiation, in the form of septate junctions and rudimentary apical microvilli. Some cells of the pupal midgut develop as endocrine cells. The pupal midgut remains closely attached to the degenerating larval midgut cells. Along with these cells, pupal midgut cells are sequestered into the lumen where they form the compact "yellow body." The formation of a pupal midgut has been reported from several other species and may represent a general feature of intestinal metamorphosis in insects.