The Drosophila gut is composed of three major parts, the foregut, midgut and hindgut, which arise from anterior and posterior invaginations of the early blastoderm. We review the process of the specification of the gut primordia, subsequent subdivision and region-specific cell differentiation in terms of developmental genetics. Graded activities of maternal signals at anterior and posterior terminal domains of the blastoderm, being mediated by activities of two zygotic gap genes, tailless and huckebein, lead to the activation of key genes that determine the gut primordia: serpent (GATA factor gene) for the endodermal midgut; brachyenteron (Brachyury homolog) for the ectodermal hindgut. fork head (HNF-3 homolog) and caudal (Cdx homolog) are also essential for the development of all gut primordia or hindgut primordium, respectively. Subdivision of the midgut epithelium is regulated by inductive signals emanating from the visceral mesoderm, which is under the control of HOM-C genes. In contrast, pattern formation of the ectodermal foregut and hindgut is regulated by secreted signaling molecules, such as Wingless (Wnt homolog), Hedgehog and Decapentaplegic (Bmp-4 homolog), as in the case of segmented structures and imaginal discs. Finally, the gut is subdivided into at least 36 compartments that are recognized asminimum tissue units of regional differentiation. A few genes that are responsible for determining and maintaining the state of overt-differentiation of the compartments have also been reported. A marked feature of the genetic mechanism of the gut development is the unexpectedly wide spectrum of the similarities of relevant genes and regulatory pathways of gene expression between Drosophila and vertebrates, which may imply a prototypic style of body plan common to protostomes and deuterostomes.