Tissue homeostasis via the elimination of aberrant cells is fundamental for organism survival. Cell competition is a key homeostatic mechanism, contributing to the recognition and elimination of aberrant cells, preventing their malignant progression and the development of tumors. Here, using Drosophila as a model organism, we have defined a role for protein tyrosine phosphatase 61F (PTP61F) (orthologue of mammalian PTP1B and TCPTP) in the initiation and progression of epithelial cancers. We demonstrate that a Ptp61F null mutation confers cells with a competitive advantage relative to neighbouring wild-type cells, while elevating PTP61F levels has the opposite effect. Furthermore, we show that knockdown of Ptp61F affects the survival of clones with impaired cell polarity, and that this occurs through regulation of the JAK–STAT signalling pathway. Importantly, PTP61F plays a robust non-cell-autonomous role in influencing the elimination of adjacent polarity-impaired mutant cells. Moreover, in a neoplastic RAS-driven polarity-impaired tumor model, we show that PTP61F levels determine the aggressiveness of tumors, with Ptp61F knockdown or overexpression, respectively, increasing or reducing tumor size. These effects correlate with the regulation of the RAS–MAPK and JAK–STAT signalling by PTP61F. Thus, PTP61F acts as a tumor suppressor that can function in an autonomous and non-cell-autonomous manner to ensure cellular fitness and attenuate tumorigenesis.