Contact inhibition of locomotion is a widespread phenomenon in migrating cells, but has to be overcome if cells are to migrate collectively as a sheet, as occurs in the leading-edge mesendoderm (LEM) cells that migrate on the ectodermal blastocoel roof of the Xenopus gastrula. Isolated LEM cells display contact inhibition in vitro, retracting lamellipodia on contact with neighbouring cells, raising the question of which mechanisms prevent contact inhibition in the gastrula to allow coherent LEM migration. Now, Martina Nagel and Rudolf Winklbauer provide a molecular analysis of this process using aggregates of LEM cells on fibronectin substrata. Expression of kinase-dead Pak1 or ephrin B1 stabilises lamellipodia and promotes formation of chains of cells migrating in a coordinated fashion, mimicking what is seen in the embryo. A series of epistatic analyses reveals a pathway regulating the stability of lamellipodia upon contact: Pak1 activates ephrin B1 via a module comprising cell surface fibronectin, integrin and syndecan. The signalling molecule PDGF-A blocks this module to promote collective migration, and is found to stabilise lamellipodia in the direction of the animal pole during in vivo LEM migration. This study thus provides a molecular framework for how to circumvent contact inhibition during collective cell migration.