Generalized transduction.

Phages occasionally carry random pieces of the host chromosome containing bacterial genes from one cell (the donor) to another (the recipient).

The transferred DNA may recombine with the genome of the recipient, bringing about a recombinant cell.