The Drosophila giant lens (gil) gene encodes a secreted molecule which if absent leads to the recruitment of additional ommatidial cells normally eliminated by apoptosis. Heat induced ectopic gil expression leads to a reduction of ommatidial cells suggesting that gil is secreted by differentiating cells to prevent the development of an excess of cells of a given ommatidial cell type. A second important defect is the misrouting of photoreceptor axons in gil mutants. However, gil function is not required in photoreceptor axons for the establishment of proper connections. We propose that gil acts on the development of lamina cells preventing the correct differentiation of the target region of photoreceptor axons and therefore leading to an axon guidance phenotype.