Recombination plays a dominant role in the evolution of the bacterial pathogen Helicobacter pylori, but its dynamics remain incompletely understood. Here we use an in vitro transformation system combined with genome sequencing to study chromosomal integration patterns after natural transformation. A single transformation cycle results in up to 21 imports, and repeated transformations generate a maximum of 92 imports (8% sequence replacement). Import lengths show a bimodal distribution with averages of 28 and 1,645 bp. Reanalysis of paired H. pylori genomes from chronically infected people demonstrates the same bimodal import pattern in vivo. Restriction endonucleases (REases) of the recipient bacteria fail to inhibit integration of homeologous DNA, independently of methylation. In contrast, REases limit the import of heterologous DNA. We conclude that restriction-modification systems inhibit the genomic integration of novel sequences, while they pose no barrier to homeologous recombination, which reconciles the observed stability of the H. pylori gene content and its highly recombinational population structure.