Muscle diversification in the Drosophila embryo is manifest in a stereotyped array of myofibers that exhibit distinct segment-specific patterns. Here it is shown that the homeotic genes of the Bithorax complex control the identities of abdominal somatic muscles and their precursors by functioning directly in cells of the mesoderm. Whereas Ultrabithorax (Ubx) and abdominal-A (abd-A) have equivalent functions in promoting the formation of particular muscle precursors in the anterior abdominal segments, Abdominal-B (Abd-B) suppresses the development of these same myogenic cells in the posterior region of the abdomen. When expressed in the same mesodermal cells, however, either UBX or ABD-A can override the inhibitory influence of ABD-B, suggesting that these factors may compete in the regulation of common downstream genes. Furthermore, targeted ectopic expression of Ubx or abd-A indicates that these homeotic genes influence muscle cell fates by autonomous action in mesodermal cells. Muscle identity also appears to be sensitive to the level of UBX in myogenic precursors. Finally, these experiments reveal that homeotic cues specific to both the mesoderm and the ectoderm cooperate to specify the pattern of muscle attachment sites.