Natural transformation is a widespread molecular pathway of horizontal gene transfer involving the uptake and recombination of exogenous DNA. Exogenous DNA follows a pathway involving genes sequentially required for its capture, internalization, protection, and recombination with the chromosome. Most of these genes were identified through the isolation of transformation-defective mutants and/or based on their expression preceding natural transformation. Yet, genes required for key steps of the pathway remain elusive. We sought to identify any missing component by comparing Tn-seq data obtained in two distantly-related transformable diderm species, the human pathogenLegionella pneumophilaand the cyanobacteriumSynechococcus elongatus. We identified yraN, a widespread and highly conserved gene of unknown function required for natural transformation. We provide evidence that YraN is a nuclease associated with the ComM helicase, which cooperate to process the D-loop formed by the invasion of the transforming DNA in the chromosomal DNA strands. We propose a model in which cleavage of the displaced strand by YraN can promote the recombination of transforming DNA, leading to extended recombination events. The identification of this YraN/ComM nuclease/helicase system supports the hypothesis that bacteria possess a conserved pathway for the transport and recombination of exogenous DNA.