The body plan of the mammalian embryo is shaped through the process of gastrulation, an early developmental event that transforms an isotropic group of cells into an ensemble of tissues that is ordered with reference to three orthogonal axes1. Although model organisms have provided much insight into this process, we know very little about gastrulation in humans, owing to the difficulty of obtaining embryos at such early stages of development and the ethical and technical restrictions that limit the feasibility of observing gastrulation ex vivo2. Here we show that human embryonic stem cells can be used to generate gastruloids-three-dimensional multicellular aggregates that differentiate to form derivatives of the three germ layers organized spatiotemporally, without additional extra-embryonic tissues. Human gastruloids undergo elongation along an anteroposterior axis, and we use spatial transcriptomics to show that they exhibit patterned gene expression. This includes a signature of somitogenesis that suggests that 72-h human gastruloids show some features of Carnegie-stage-9 embryos3. Our study represents an experimentally tractable model system to reveal and examine human-specific regulatory processes that occur during axial organization in early development.