The directional migration of many cell populations occurs as a coherent group. An amenable model is provided by the posterior lateral line in zebrafish, which is formed by a cohesive primordium that migrates from head to tail and deposits future neuromasts at intervals. We found that prior to the onset of migration, the compact state of the primordium is not fully established, as isolated cells with lateral line identity are present caudal to the main primordium. These isolated cells are retained in position such that they fuse with the migrating primordium as it advances, and later contribute to the leading zone and terminal neuromasts. We found that the isolated lateral line cells are positioned by two antagonistic cues: Fgf signalling attracts them towards the primordium, which counteracts Sdf1α/Cxcr4b-mediated caudal attraction. These findings reveal a novel chemotactic role for Fgf signalling in which it enables the coalescence of the lateral line primordium from an initial fuzzy pattern into a compact group of migrating cells.