The Drosophila embryonic hindgut is a robust system for the study of patterning and morphogenesis of epithelial organs. We show that, in a period of about 10 h, and in the absence of significant cell division or apoptosis, the hindgut epithelium undergoes morphogenesis by changes in cell shape and size and by cell rearrangement. The epithelium concomitantly becomes surrounded by visceral mesoderm and is characterized by distinct gene expression patterns that forecast the development of three morphological subdomains: small intestine, large intestine, and rectum. At least three genes encoding putative transcriptional regulators, drumstick (drm), bowl, and lines (lin), are required to establish normal hindgut morphology. We show that the defect in hindgut elongation in drm, bowl, and lin mutants is due, in large part, to the requirement of these genes in the process of cell rearrangement. Further, we show that drm, bowl, and lin are required for patterning of the hindgut, i.e., for correct expression in the prospective small intestine, large intestine, and rectum of genes encoding cell signals (wingless, hedgehog, unpaired, Serrate, dpp) and transcription factors (engrailed, dead ringer). The close association of both cell rearrangement and patterning defects in all three mutants suggest that proper patterning of the hindgut into small intestine and large intestine is likely required for its correct morphogenesis.