Patterning of the posterior end in animals is not well understood. Homologs of Drosophila even-skipped (eve) have a similar posterior expression pattern in many animals, and in vertebrates they are linked physically to the "posterior" ends of homeotic clusters (HOM-C), suggesting a conserved role in posterior development. However, the function of this posterior expression is not known. Here I show that the Caenorhabditis elegans gene vab-7 encodes an eve homolog that is required for posterior development and expressed in a pattern strikingly similar to that of vertebrate eve genes. Using a four-dimensional recording system, I found that posterior body muscles and the posterior epidermis are patterned abnormally in vab-7 mutants, but commitment to muscle and epidermal fates is normal. Furthermore, vab-7 activity is required for the complete expression of the most posterior HOM-C gene egl-5 in muscle cells, supporting the idea that eve homologs may act with the HOM-C to determine posterior cell fates. The conservation of sequence and expression pattern between vab-7 and eve homologs in other animals argues that most eve genes have posterior mesodermal and ectodermal patterning functions.