What makes this protein, called Hemo, so unusual is that it’s not made by the mother. Instead, it is made in her fetus and in the placenta, by a gene that originally came from a virus that infected our mammalian ancestors more than 100 million years ago.

Hemo is not the only protein with such an alien origin: Our DNA contains roughly 100,000 pieces of viral DNA. Altogether, they make up about 8 percent of the human genome. And scientists are only starting to figure out what this viral DNA is doing to us.

Aris Katzourakis, a virologist at the University of Oxford, and his colleagues recently published a commentary in the journal Trends in Microbiology in which they explored the possibility that viral genes that produce proteins like Hemo are affecting our health in a variety of unexpected ways.

Some of our ancient viruses may be protecting us from disease; others may be raising our risks for cancer, among other conditions. “It’s not an either-or — are these things good or bad? It’s a lot more complicated than that,” Dr. Katzourakis said in an interview. “We’re barely at the beginning of this research.”

Most of our viral DNA comes from one group in particular: retroviruses, a group that includes HIV.

A retrovirus invades a host cell and inserts its genes into that cell’s DNA. These viral genes co-opt the cell’s machinery, using it to make new viruses that escape to infect more cells.

If a retrovirus happens to infect an egg or sperm, its DNA can potentially be passed to the next generation and the generation after that. Once retroviruses become inherited stowaways, scientists refer to them as endogenous retroviruses.

At first, endogenous retroviruses coax cells to make more retroviruses that can infect other cells. But over the generations, the viral DNA mutates, and endogenous retroviruses eventually lose the ability to infect new cells.

Even after being hobbled, these endogenous retroviruses can still sometimes make their proteins. And they can also reproduce, after a fashion. They can force cells to make copies of their DNA, which are inserted back in the cell’s own genome.

After a single infection, an endogenous retrovirus may build up hundreds of copies of itself in its host’s DNA.

Some endogenous retroviruses are unique to humans, but others are found in a variety of species. In January, Dr. Katzourakis was a co-author on a study showing that one retrovirus common in mammals also is present in fish like cod and tuna. Retroviruses, that study indicated, were invading our marine ancestors 450 million years ago — or even earlier.

Just as we have defenses against free-living viruses, we have also developed defenses against endogenous retroviruses. Our cells can coat their DNA with molecules that suppress viral genes, for example.

But sometimes these viral genes manage to switch on anyway. In many kinds of tumor cells, for instance, scientists find proteins produced by endogenous retroviruses. That discovery has fueled a long-running debate: Do endogenous retroviruses help cause cancer?

Recent studies suggest they can. A team of French researchers engineered healthy human cells to make a viral protein found in many tumors and watched the cells grow in a petri dish.

The protein caused the cells to behave in some suspiciously cancer-like ways. They changed shape, as cancer cells do, becoming long and skinny. And they also started to move across the dish.

In addition, the viral protein caused the cells to switch on other genes that have been linked to cancer.

But John M. Coffin, a virologist at Tufts University, suspects there’s less to these viral proteins than meets the eyes. He speculates that in many cases, cancer cells make viral proteins only because they are switching on genes willy-nilly — both human and viral genes alike.

“Our starting position is that this is largely a chance event,” Dr. Coffin said.

But in certain cases, Dr. Coffin said, we have domesticated our viruses. We make proteins from endogenous retroviruses to carry out functions we depend on. Some endogenous retroviruses offer protection against other viruses, for example.

And some viral proteins are important for reproduction. Placentas make viral proteins, and scientists have found that some types, known as syncytins, fuse together placental cells, a crucial step in fetal development.

“My speculation is that without syncytins, mammal evolution would have looked very different,” Dr. Coffin said.

Five years ago, the French biologist Odile Heidmann and her colleagues went on a search for more endogenous retroviruses in the human genome.

Dr. Heidmann, who works at Gutave Roussy, a cancer research institute in Paris, discovered a stretch of viral DNA that had gone overlooked. She and her colleagues named it Hemo.

Dr. Heidmann was surprised to find versions of Hemo in other species. Among primates, the gene that makes this protein has barely changed over the ages.

Its consistency across many species shows that the gene and its protein must have an important job to do: “It isn’t simply a relic,” Dr. Heidmann said. Mutations to Hemo must have been harmful or even fatal to the unfortunate animals who had them.

The placenta produces Hemo, and so do cells in the early embryo itself. But so far Dr. Heidmann and her colleagues have not been able to figure out why.

“It’s very, very old, so it has to do something,” she said. It’s possible, she said, that Hemo proteins are a message from fetus to mother, dampening the mother’s immune system so that it doesn’t attack the fetus.

But there are other possibilities, too.

The early embryo is a hotbed of activity for endogenous retroviruses, recent studies have shown. To understand why embryonic cells make viral proteins, scientists have run experiments to see what happens when viral genes are silenced.

These experiments suggest that viral proteins help the embryo develop a variety of tissues.

Early on, the cells in an embryo can turn into any tissue. As these stem cells divide, they can lose this flexibility, committing to becoming one kind of cell or another. After that, cells typically shut down their viral genes.

Viral proteins appear to help keep stem cells from losing this potential. And Gkikas Magiorkinis of the University of Athens has speculated that this feature might have a sinister origin.

Viruses might have exploited embryos to make more copies of themselves. By keeping their hosts as stem cells for longer, the viruses were able to invade more parts of the embryo’s body.

“When the host grows, it will have copies in the retrovirus in most of its cells,” Dr. Magiorkinis said.

This strategy may do more than create more viruses. Stem cells can produce eggs and sperm in embryos. The viruses may be raising their odds of getting into the next generation.

In other words, early embryos may have come to depend on the tricks viruses use to manipulate them. “We’re exploiting a property that has evolved for the virus’s benefit,” Dr. Katzourakis said.