The plasticity of developing tissues relies on the adjustment of cell survival and growth rate to environmental cues. This includes the effect of mechanical cues on cell survival. Accordingly, compaction of an epithelium can lead to cell extrusion and cell death. This process was proposed to contribute to tissue homeostasis but also to facilitate the expansion of pretumoral cells through the compaction and elimination of the neighboring healthy cells. However, we know very little about the pathways that can trigger apoptosis upon tissue deformation, and the contribution of compaction-driven death to clone expansion has never been assessed in vivo. Using the Drosophila pupal notum and a new live sensor of ERK, we show first that tissue compaction induces cell elimination through the downregulation of epidermal growth factor receptor/extracellular signal regulated kinase (EGFR/ERK) pathway and the upregulation of the pro-apoptotic protein Hid. Those results suggest that the sensitivity of EGFR/ERK pathway to mechanics could play a more general role in the fine tuning of cell elimination during morphogenesis and tissue homeostasis. Second, we assessed in vivo the contribution of compaction-driven death to pretumoral cell expansion. We found that the activation of the oncogene Ras in clones can downregulate ERK and activate apoptosis in the neighboring cells through their compaction, which eventually contributes to Ras clone expansion. The mechanical modulation of EGFR/ERK during growth-mediated competition for space may contribute to tumor progression.