Summary Actin-based motility is used by various pathogens for dissemination within and between cells. Yet host factors restricting this process have not been identified. Septins are GTP-binding proteins that assemble as filaments and are essential for cell division. However, their role during interphase has remained elusive. Here, we report that septin assemblies are recruited to different bacteria that polymerize actin. We observed that intracytosolic Shigella either become compartmentalized in septin cage-like structures or form actin tails. Inactivation of septin caging increases the number of Shigella with actin tails and enhances cell-to-cell spread. TNF-α, a host cytokine produced upon Shigella infection, stimulates septin caging and restricts actin tail formation and cell-to-cell spread. Finally, we show that septin cages entrap bacteria targeted to autophagy. Together, these results reveal an unsuspected mechanism of host defense that restricts dissemination of invasive pathogens.