The genomes of bacteria derived from the gut microbiota are replete with pathways that mediate contact-dependent interbacterial antagonism. However, the role of direct interactions between co-resident microbes in driving microbiome composition is not well understood. Here we report the widespread occurrence of acquired interbacterial defense (AID) gene clusters in the human gut microbiome. These clusters are found on predicted mobile elements and encode arrays of immunity genes that confer protection against interbacterial toxin-mediated antagonism in vitro and in gnotobiotic mice. We find that Bacteroides ovatus strains containing AID systems that inactivate B. fragilis toxins delivered between cells by the type VI secretion system are enriched in samples lacking detectable B. fragilis. Moreover, these strains display significantly higher abundance in gut metagenomes than strains without AID systems. Finally, we identify a recombinase-associated AID subtype present broadly in Bacteroidales genomes with features suggestive of active gene acquisition. Our data suggest that neutralization of contact-dependent interbacterial antagonism via AID systems plays an important role in shaping human gut microbiome ecology.