During embryonic development in vertebrates, the endoderm becomes patterned along the anteroposterior axis to produce distinct derivatives. How this regulation is controlled is not well understood. We report that the zebrafish hairy/enhancer of split [E(spl)]-related gene her5 plays a critical role in this process. At gastrulation, following endoderm induction and further cell interaction processes including a local release of Notch/Delta signaling, her5 expression is progressively excluded from the presumptive anterior- and posteriormost mesendodermal territories to become restricted to an adjacent subpopulation of dorsal endodermal precursors. Ectopic misexpressions of wild-type and mutant forms of her5 reveal that her5 functions primarily within the endodermal/endmost mesendodermal germ layer to inhibit cell participation to the endmost-fated mesendoderm. In this process, her5 acts as an active transcriptional repressor. These features are strikingly reminiscent of the function of Drosophila Hairy/E(spl) factors in cell fate decisions. Our results provide the first model for vertebrate endoderm patterning where an early regulatory step at gastrulation, mediated by her5 controls cell contribution jointly to the anterior- and posteriormost mesendodermal regions.