In the mouse, the definitive endoderm is derived from the epiblast during gastrulation, and, at the early organogenesis stage, forms the primitive gut tube, which gives rise to the digestive tract, liver, pancreas and associated visceral organs. The transcription factors, Sox17 (a Sry-related HMG box factor) and its upstream factors, Mixer (homeobox factor) and Casanova (a novel Sox factor), have been shown to function as endoderm determinants in Xenopus and zebrafish, respectively. However, whether the mammalian orthologues of these genes are also involved with endoderm formation is not known. We show that Sox17(-/-) mutant embryos are deficient of gut endoderm. The earliest recognisable defect is the reduced occupancy by the definitive endoderm in the posterior and lateral region of the prospective mid- and hindgut of the headfold-stage embryo. The prospective foregut develops properly until the late neural plate stage. Thereafter, elevated levels of apoptosis lead to a reduction in the population of the definitive endoderm in the foregut. In addition, the mid- and hindgut tissues fail to expand. These are accompanied by the replacement of the definitive endoderm in the lateral region of the entire length of the embryonic gut by cells that resemble the visceral endoderm. In the chimeras, although Sox17-null ES cells can contribute unrestrictedly to ectodermal and mesodermal tissues, few of them could colonise the foregut endoderm and they are completely excluded from the mid- and hindgut endoderm. Our findings indicate an important role of Sox17 in endoderm development in the mouse, highlighting the idea that the molecular mechanism for endoderm formation is likely to be conserved among vertebrates.