Bacteria have developed mechanisms to communicate and compete with one another in diverse environments. A new form of intercellular communication, contact-dependent growth inhibition (CDI), was discovered recently in Escherichia coli. CDI is mediated by the CdiB/CdiA two-partner secretion (TPS) system. CdiB facilitates secretion of the CdiA 'exoprotein' onto the cell surface. An additional small immunity protein (CdiI) protects CDI(+) cells from autoinhibition. The mechanisms by which CDI blocks cell growth and by which CdiI counteracts this growth arrest are unknown. Moreover, the existence of CDI activity in other bacteria has not been explored. Here we show that the CDI growth inhibitory activity resides within the carboxy-terminal region of CdiA (CdiA-CT), and that CdiI binds and inactivates cognate CdiA-CT, but not heterologous CdiA-CT. Bioinformatic and experimental analyses show that multiple bacterial species encode functional CDI systems with high sequence variability in the CdiA-CT and CdiI coding regions. CdiA-CT heterogeneity implies that a range of toxic activities are used during CDI. Indeed, CdiA-CTs from uropathogenic E. coli and the plant pathogen Dickeya dadantii have different nuclease activities, each providing a distinct mechanism of growth inhibition. Finally, we show that bacteria lacking the CdiA-CT and CdiI coding regions are unable to compete with isogenic wild-type CDI(+) cells both in laboratory media and on a eukaryotic host. Taken together, these results suggest that CDI systems constitute an intricate immunity network with an important function in bacterial competition.