The elimination of unfit cells from a tissue is a process known in Drosophila and mammals as cell competition. In a well-studied paradigm "loser" cells that are heterozygous mutant for a haploinsufficient ribosomal protein gene are eliminated from developing tissues via apoptosis when surrounded by fitter wild-type cells, referred to as "winner" cells. However, the mechanisms underlying the induction of this phenomenon are not fully understood. Here we report that a CCAAT-Enhancer-Binding Protein (C/EBP), Xrp1, which is known to help maintaining genomic stability after genotoxic stress, is necessary for the elimination of loser clones in cell competition. In loser cells, Xrp1 is transcriptionally upregulated by an autoregulatory loop and is able to trigger apoptosis - driving cell elimination. We further show that Xrp1 acts in the nucleus to regulate the transcription of several genes that have been previously involved in cell competition. We therefore speculate that Xrp1 might play a fundamental role as a molecular caretaker of the genomic integrity of tissues.