The arthropods constitute the most diverse animal group, but, despite their rich fossil record and a century of study, their phylogenetic relationships remain unclear. Taxa previously proposed to be sister groups to the arthropods include Annelida, Onychophora, Tardigrada and others, but hypotheses of phylogenetic relationships have been conflicting. For example, onychophorans, like arthropods, moult periodically, have an arthropod arrangement of haemocoel, and have been related to arthropods in morphological and mitochondrial DNA sequence analyses. Like annelids, they possess segmental nephridia and muscles that are a combination of smooth and obliquely striated fibres. Our phylogenetic analysis of 18S ribosomal DNA sequences indicates a close relationship between arthropods, nematodes and all other moulting phyla. The results suggest that ecdysis (moulting) arose once and support the idea of a new clade, Ecdysozoa, containing moulting animals: arthropods, tardigrades, onychophorans, nematodes, nematomorphs, kinorhynchs and priapulids. No support is found for a clade of segmented animals, the Articulata, uniting annelids with arthropods. The hypothesis that nematodes are related to arthropods has important implications for developmental genetic studies using as model systems the nematode Caenorhabditis elegans and the arthropod Drosophila melanogaster, which are generally held to be phylogenetically distant from each other.