Contact-dependent growth inhibition (CDI) systems are widespread amongst Gram-negative bacteria where they play important roles in inter-cellular competition and biofilm formation. CDI+ bacteria use cell-surface CdiA proteins to bind neighboring bacteria and deliver C-terminal toxin domains. CDI+ cells also express CdiI immunity proteins that specifically neutralize toxins delivered from adjacent siblings. Genomic analyses indicate that cdi loci are commonly found on plasmids and genomic islands, suggesting that these Type 5 secretion systems are spread through horizontal gene transfer. Here, we examine whether CDI toxin and immunity activities serve to stabilize mobile genetic elements using a minimal F plasmid that fails to partition properly during cell division. This F plasmid is lost from Escherichia coli populations within 50 cell generations, but is maintained in ~60% of the cells after 100 generations when the plasmid carries the cdi gene cluster from E. coli strain EC93. By contrast, the ccdAB "plasmid addiction" module normally found on F exerts only a modest stabilizing effect. cdi-dependent plasmid stabilization requires the BamA receptor for CdiA, suggesting that plasmid-free daughter cells are inhibited by siblings that retain the CDI+ plasmid. In support of this model, the CDI+ F plasmid is lost rapidly from cells that carry an additional cdiI immunity gene on a separate plasmid. These results indicate that plasmid stabilization occurs through elimination of non-immune cells arising in the population via plasmid loss. Thus, genetic stabilization reflects a strong selection for immunity to CDI. After long-term passage for more than 300 generations, CDI+ plasmids acquire mutations that increase copy number and result in 100% carriage in the population. Together, these results show that CDI stabilizes genetic elements through a toxin-mediated surveillance mechanism in which cells that lose the CDI system are detected and eliminated by their siblings.