The SH2 domain-containing tyrosine phosphatase Shp2 plays a pivotal role during the gastrulation of vertebrate embryos. However, because of the complex phenotype observed in mouse mutant embryos, the precise role of Shp2 during development is unclear. To define the specific functions of this phosphatase, Shp2 homozygous mutant embryonic stem cells bearing the Rosa-26 LacZ transgene were isolated and used to perform a chimeric analysis. Here, we show that Shp2 mutant cells amass in the tail bud of embryonic day 10.5 chimeric mouse embryos and that this accumulation begins at the onset of gastrulation. At this early stage, Shp2 mutant cells collect in the primitive streak of the epiblast and thus show deficiencies in their contribution to the mesoderm lineage. In high-contribution chimeras, we show that overaccumulation of Shp2 mutant cells at the posterior end of the embryo results in two abnormal phenotypes: spina bifida and secondary neural tubes. Consistent with a failure to undergo morphogenic movements at gastrulation, Shp2 is required for embryo fibroblast cells to mount a positive chemotactic response to acidic fibroblast growth factor in vitro. Our results demonstrate that Shp2 is required at the initial steps of gastrulation, as nascent mesodermal cells form and migrate away from the primitive streak. The aberrant behavior of Shp2 mutant cells at gastrulation may result from their inability to properly respond to signals initiated by fibroblast growth factors.