What could be more alien than a virus? It’s a nanobiological weapon — a microscopic protein shell holding a few genes that hijack a cell’s internal machinery, forcing it to make new viruses. The battles we fight with these alien enemies brings malaise, scars and even death.

Yet as foreign as viruses may seem, the boundary between us and them is turning out to be remarkably blurry. We use DNA from viruses to do things that are essential to our own survival, scientists are finding. Somehow, we have managed to domesticate some of these invaders.

A number of viruses replicate by inserting their DNA into our own genes. On rare occasions, their genes get passed down to future generations.

At first, the newly acquired genes behave a lot like regular virus genes. They can still coax host cells to make full-fledged viruses that can escape and infect other victims.