The transfer of bacterial DNA by phages from an infected bacterium to another bacterium. This also refers to the transfer of genes into eukaryotic cells by vir…