Abstract In addition to their role in DNA repair, recombination events are associated with processes aimed at providing the genetic variability needed for adaptation and evolution of a population. In bacteria, recombination is involved in the appearance of new variants by allowing the incorporation of exogenous DNA or the reshuffling of endogenous sequences. Here we show that HpMutS2, a protein belonging to the MutS2 family in Helicobacter pylori, is not involved in mismatch repair but inhibits homologous and homeologous recombination. Disruption of HpmutS2 leads to an increased efficiency of exogenous DNA incorporation. HpMutS2 has a selective affinity for DNA structures mimicking recombination intermediates with no specificity for homoduplex DNA or mismatches. The purified protein has an ATPase activity stimulated by the same DNA structures. Finally, we show that HpMutS2 inhibits DNA strand exchange reactions in vitro. Thus, MutS2 proteins are candidates for controlling recombination and therefore genetic diversity in bacteria.