The semaphorin gene family has been shown to play important roles in axonal guidance in both vertebrates and invertebrates. Both transmembrane (Sema1a, Sema1b, Sema5c) and secreted (Sema2a, Sema2b) forms of semaphorins exist in Drosophila. Two Sema receptors, plexins (Plex) A and B, have also been identified. Many questions remain concerning the axon guidance functions of the secreted semaphorins, including the identity of their receptors. We have used the well-characterized sensory system of the Drosophila embryo to address these problems. We find novel sensory axon defects in sema2a loss-of-function mutants in which particular axons misproject and follow inappropriate pathways to the CNS. plexB loss-of-function mutants show similar phenotypes to sema2a mutants and sema2a interacts genetically with plexB, supporting the hypothesis that Sema2a signals through PlexB receptors. Sema2a protein is expressed by larval oenocytes, a cluster of secretory cells in the lateral region of the embryo and the sema2a mutant phenotype can be rescued by driving Sema2a in these cells. Ablation of oenocytes results in sensory axon defects similar to the sema2a mutant phenotype. These data support a model in which Sema2a, while being secreted from oenocytes, acts in a highly localized fashion: It represses axon extension from the sensory neuron cell body, but only in regions in direct contact with oenocytes.