The formation of a complex nervous system requires the intricate interaction of neurons and glial cells. Glial cells generally migrate over long distances before they initiate their differentiation, which leads to wrapping and insulation of axonal processes. The molecular pathways coordinating the switch from glial migration to glial differentiation are largely unknown. Here we demonstrate that, within the Drosophila eye imaginal disc, fibroblast growth factor (FGF) signalling coordinates glial proliferation, migration and subsequent axonal wrapping. Glial differentiation in the Drosophila eye disc requires a succession from glia-glia interaction to glia-neuron interaction. The neuronal component of the fly eye develops in the peripheral nervous system within the eye-antennal imaginal disc, whereas glial cells originate from a pool of central-nervous-system-derived progenitors and migrate onto the eye imaginal disc. Initially, glial-derived Pyramus, an FGF8-like ligand, modulates glial cell number and motility. A switch to neuronally expressed Thisbe, a second FGF8-like ligand, then induces glial differentiation. This switch is accompanied by an alteration in the intracellular signalling pathway through which the FGF receptor channels information into the cell. Our findings reveal how a switch from glia-glia interactions to glia-neuron interactions can trigger formation of glial membrane around axonal trajectories. These results disclose an evolutionarily conserved control mechanism of axonal wrapping, indicating that Drosophila might serve as a model to understand glial disorders in humans.