Hox genes encode evolutionarily conserved transcription factors involved in morphological specification along the anteroposterior body axis of animals. The two most striking features of Hox genes are colinearity and the strong sequence conservation. Among all animals studied so far, the nematode Caenorhabditis elegans contains one of the most divergent Hox clusters. The core cluster contains only four members, which in part deviate from the colinearity rule. In addition, orthologous and paralogous nematode Hox sequences diverged substantially. Given these nematode-specific features, we asked how these Hox proteins evolved and how they provide functional specificity. We investigated the role of MAB-5 during ray formation and established an in vivo assay using Cel-mab-5 regulatory elements to express orthologous, paralogous and chimeric cDNAs in a Cel-mab-5 mutant background. We show that the MAB-5 ortholog from Pristionchus pacificus, but not the C. elegans paralogous Hox proteins can rescue Cel-mab-5. Experiments with chimeric, truncated and mutagenized Hox proteins suggest the specificity to be conferred by the N-terminal arm and helix I, but not helix II of the homeodomain.