Adults today are more likely to have herpes — oral or genital — than not. But where did this widespread disease come from?

To answer that question, you’ll have to go back millions of years, to a time before we were human.

New genomic analysis has found that oral herpes may have been around since before our split with chimpanzees happened about 6 million years ago. The virus then branched out and followed the evolution of hominids to become oral herpes, or herpes simplex virus 1 (HSV-1).

“The ancestor of all monkeys and apes had the herpes virus,” said study author and virologist Joel Wertheim of the University of California at San Diego. “When the host species lineage started to split, the viruses also formed new lineages.”

The virus responsible for genital herpes hit our ancestors later, likely jumping from proto-chimps to a now-extinct hominid — either Homo habilis or Homo erectus — about 1.6 million years ago. The ancient virus eventually gave rise to what is now known as herpes simplex virus 2 (HSV-2) in humans, commonly spread through sexual contact.

Because the chimpanzee herpes simplex virus found its way back into our lineage, we are the only primate species known to be infected with two distinct herpes simplex viruses. But how the transmission occurred from primate-to-hominid all those years ago remains a mystery.

“We can’t say whether the interaction that led to cross-transmission was physical aggression or sexual contact,” Wertheim said. “We just don’t know, but both are possible.”

Alternate means could have been through hominids hunting and eating the meat of proto-chimps or living with them in close quarters, said virologist Alberto Severini of the University of Manitoba, who was not involved in the research.

Wertheim and his colleagues traced the evolution of the herpes virus by looking at the genetic material and the mutations of primate simplex viruses from nine host species, including chimpanzees, baboons and macaques.

“By looking at the number of these mutations, you can infer the time that it took for two strains to diverge,” Severini said.

Experts emphasize that the findings are only estimates, although the future isolation of gorilla or orangutan herpes simplex viruses could be the missing pieces that fill in the full story. The study was published online Thursday in the journal Molecular Biology and Evolution.

The nature of viruses seems to be a matter of controversy among scientists. These tiny, odd packets of genetic material lie somewhere between the living and nonliving, and their origins are unknown. When left alone, a virus is an inert container of either DNA or RNA wrapped in a protein coat. But when one comes into contact with the right host, it wakes up immediately and begins to use the cell’s own replication machinery to duplicate itself.

Several theories speculate about where viruses originated and how far back they go. Most likely, there is no one right answer — different viruses could have different origins. For instance, DNA viruses (including herpes) probably derived from bacteriophages, or viruses that infect bacteria. Simplex viruses specifically are only one subset of a broad group of herpes viruses, whose evolutionary tree overlaps with that of its vertebrate hosts for hundreds of millions of years.

Viruses that are new to humans commonly enter our systems through animal contact. New influenza strains usually come from pigs or birds, HIV and Ebola viruses were passed to us from primates, and measles came from cows.

Although we think of viruses as out to kill us, they actually require a relatively happy relationship with their hosts in order to stay active and reproduce.

“Both the virus and the host share the common dream of coexisting,” said virologist Julia Hilliard of Georgia State University, who was not involved in the study. “If they can coexist, that’s to the benefit of both.”

This is why co-divergence of virus and host is the ideal situation, Hilliard said, rather than cross-transmission. This way, both parties could have the benefit of evolving in tandem to establish an eventual parasite-host equilibrium. If instead the virus appears in a brand-new host species, the results can be dangerously unstable. For instance, the herpes B virus is endemic in macaque monkeys, but when contracted by humans, it can lead to death within weeks.

The viruses that are virulent to humans tend to have been transmitted from animals more recently than HSV-1 and -2, which infect their hosts for life but mostly are not fatal. In particular, Severini wonders whether the extremely widespread HSV-1 — 60 to 90 percent of adults worldwide are infected — has simply become a resident of our bodies as part of our microbiome.

“Herpes viruses tend to establish an equilibrium with the host,” he said. “You wonder if they are bad or just part of the normal flora like the bacteria in our guts.”

Kim is a freelance science journalist based in Philadelphia.