The Drosophila heart is a highly ordered structure with only a limited number of cell types, which are arranged in a stereotyped metameric pattern. Ras signaling has previously been implicated in contributing to heart formation, but how positional information is integrated with this pathway to specify, distinguish and precisely position individual cardiac progenitors within the presumptive heart-forming region are not known. Here, we present evidence that the striped pattern of the secreted factor Hedgehog (Hh), in combination with the RAS pathway, specifies and positions neighboring groups of cardiac progenitors within each segment: the anterior ladybird (lbe)- and the posterior even skipped (eve)-expressing cardiac progenitors. Loss of hh function (while maintaining wg activity) results in the absence of the Eve cells, whereas the Lbe cells are expanded within the cardiac mesoderm. Overexpressing the repressor form of Cubitus interruptus (Ci), a Hh pathway antagonist, also results in expansion of Lbe at the expense of Eve, as does lowering Ras signaling. Conversely, overexpression of Hh or increasing Ras signaling eliminates Lbe expression while expanding Eve within the cardiogenic mesoderm. Increasing Ras signaling in the absence of Hh suggests that the Ras pathway is in part epistatic to Hh. Hh controls dorsal mesodermal Ras signaling by transcriptional regulation of the EGF receptor ligand protease, encoded by rhomboid (rho). Conversely, Hh overexpression can fully inhibit Lbe even when Ras signaling is much reduced, suggesting that Hh also acts in parallel to Ras. We propose that the Eve precursors next to the Hh stripe are distinguished from more distant Lbe precursors by locally augmenting Ras signaling via elevating rho transcripts. Thus, the spatial precision of cell type specification within an organ depends on multiple phases of inductive interaction between the ectoderm and the mesoderm.