Trophic mechanisms in which neighboring cells mutually control their survival by secreting extracellular factors play an important role in determining cell number. However, how trophic signaling suppresses cell death is still poorly understood. We now show that the survival of a subset of midline glia cells in Drosophila depends upon direct suppression of the proapoptotic protein HID via the EGF receptor/RAS/MAPK pathway. The TGFalpha-like ligand SPITZ is activated in the neurons, and glial cells compete for limited amounts of secreted SPITZ to survive. In midline glia that fail to activate the EGFR pathway, HID induces apoptosis by blocking a caspase inhibitor, Diap1. Therefore, a direct pathway linking a specific extracellular survival factor with a caspase-based death program has been established.