Cells of the spinal cord and somites arise from shared, dual-fated precursors, located towards the posterior of the elongating embryo. Here we show that these neuromesodermal progenitors (NMPs) can readily be generated in vitro from mouse and human pluripotent stem cells by activating Wnt and Fgf signalling, timed to emulate in vivo development. Similar to NMPs in vivo, these cells co-express the neural factor Sox2 and the mesodermal factor Brachyury and differentiate into neural and paraxial mesoderm in vitro and in vivo. The neural cells produced by NMPs have spinal cord but not anterior neural identity and can differentiate into spinal cord motor neurons. This is consistent with the shared origin of spinal cord and somites and the distinct ontogeny of the anterior and posterior nervous system. Systematic analysis of the transcriptome during differentiation identifies the molecular correlates of each of the cell identities and the routes by which they are obtained. Moreover, we take advantage of the system to provide evidence that Brachyury represses neural differentiation and that signals from mesoderm are not necessary to induce the posterior identity of spinal cord cells. This indicates that the mesoderm inducing and posteriorising functions of Wnt signalling represent two molecularly separate activities. Together the data illustrate how reverse engineering normal developmental mechanisms allows the differentiation of specific cell types in vitro and the analysis of previous difficult to access aspects of embryo development.