Different classes of vertebrate motor neuron that innervate distinct muscle targets express unique combinations of LIM-homeodomain transcription factors, suggesting that a combinatorial code of LIM-homeodomain proteins may underlie the control of motor-neuron pathway selection. Studies of LIM-homeodomain genes in mouse, Drosophila melanogaster and Caenorhabditis elegans have revealed functions of these genes in neuronal survival, axon guidance, neurotransmitter expression and neuronal function, but, to our knowledge, none of these studies have addressed the issue of a functional code. Here we study two members of this gene family in Drosophila, namely lim3, the homologue of the vertebrate Lhx3 and Lhx4 genes, and islet, the homologue of the vertebrate Isl1 and Is12 genes. We show that Drosophila lim3 is expressed by a specific subset of islet-expressing motor neurons and that mutating or misexpressing lim3 switches motor-neuron projections predictably. Our results provide evidence that lim3 and islet constitute a combinatorial code that generates distinct motor-neuron identities.