Much of our present knowledge of the biological processes involved in pattern formation in Drosophila is derived from segmentation analysis. Comparatively little is known about the genetic requirement and mechanisms underlying the formation and separation of germ layers by morphogenetic movements during gastrulation. Here we show that the Drosophila gene huckebein (hkb), a member of the gap-gene class of segmentation genes, is required for germ-layer formation at blastoderm. Absence of the hkb product, an Sp1/egr-like zinc-finger protein, causes the ectodermal and mesodermal primordia to expand at the expense of endoderm anlagen. Conversely, ectopic expression of hkb inhibits the formation of the major gastrulation fold which gives rise to the mesoderm and prevents normal segmentation in the ectoderm. Thus, hkb is necessary for endoderm development and its activity defines spatial limits within the blastoderm embryo in which the germ layers are established.