The collective migration of cells in the form of cohesive tissues is a hallmark of both morphogenesis and repair. The extrinsic cues that direct these complex migrations usually act by regulating the dynamics of a specific subset of cells, those at the leading edge. Given that normally the function of tissue migration is to lay down multicellular structures, such as branched epithelial networks or sensory organs, it is surprising how little is known about the mechanisms that organize cells behind the leading edge. Cells of the zebrafish lateral line primordium switch from mesenchyme-like leader cells to epithelial rosettes that develop into mechanosensory organs. Here, we show that this transition is regulated by an Fgf signaling circuit that is active within the migrating primordium. Point sources of Fgf ligand drive surrounding cells towards a ;non-leader' fate by increasing their epithelial character, a prerequisite for rosette formation. We demonstrate that the dynamic expression of Fgf ligands determines the spatiotemporal pattern of epithelialization underlying sensory organ formation in the lateral line. Furthermore, this work uncovers a surprising link between internal tissue organization and collective migration.