The Drosophila visceral mesoderm (VM) is a favorite system for studying the regulation of target genes by Hox proteins. The VM is formed by cells from only the anterior subdivision of each mesodermal parasegment (PS). We show here that the VM itself acquires modular anterior-posterior subdivisions similar to those found in the ectoderm. As VM progenitors merge to form a continuous band running anterior to posterior along the embryo, expression of connectin (con) in 11 metameric patches within the VM reveals VM subdivisions analagous to ectodermal compartments. The VM subdivisions form in response to ectodermal production of secreted signals encoded by the segment polarity genes hedgehog (hh) and wingless (wg) and are independent of Hox gene activity. A cascade of induction from ectoderm to mesoderm to endoderm thus subdivides the gut tissues along the A-P axis. Induction of VM subdivisions may converge with Hox-mediated information to refine spatial patterning in the VM. Con patches align with ectodermal engrailed stripes, so the VM subdivisions correspond to PS 2-12 boundaries in the VM. The PS boundaries demarcated by Con in the VM can be used to map expression domains of Hox genes and their targets with high resolution. The resultant map suggests a model for the origins of VM-specific Hox expression in which Hox domains clonally inherited from blastoderm ancestors are modified by diffusible signals acting on VM-specific enhancers.