The Drosophila wing is formed by two cell populations, the anterior and posterior compartments, which are distinguished by the activity of the selector gene engrailed (en) in posterior cells. Here, we show that en governs growth and patterning in both compartments by controlling the expression of the secreted proteins hedgehog (hh) and decapentaplegic (dpp) as well as the response of cells to these signaling molecules. First, we demonstrate that en activity programs wing cells to express hh whereas the absence of en activity programs them to respond to hh by expressing dpp. As a consequence, posterior cells secrete hh and induce a stripe of neighboring anterior cells across the compartment boundary to secrete dpp. Second, we demonstrate that dpp can exert a long-range organizing influence on surrounding wing tissue, specifying anterior or posterior pattern depending on the compartmental provenance, and hence the state of en activity, of the responding cells. Thus, dpp secreted by anterior cells along the compartment boundary has the capacity to organize the development of both compartments. Finally, we report evidence suggesting that dpp may exert its organizing influence by acting as a gradient morphogen in contrast to hh which appears to act principally as a short range inducer of dpp.