Some DNA viruses encode a recombinase that facilitates homologous recombination.  A well-studied example is the UvsX recombinase encoded by bacteriophage T4.  UvsX is homologous to bacterial RecA.  UvsX, like RecA, can facilitate the assimilation of linear single-stranded DNA into an homologous DNA duplex to produce a D-loop.