Pigs belong to the order Artiodactyla, the even-toed ungulates, which makes them relatives of an unexpectedly wide cast of mammals: deer, cattle, camels, giraffes, hippos, and even whales. The connection that tends to catch people off guard is not the pig-to-hippo link but the fact that hippos and whales are each other’s closest living relatives, and pigs sit on a neighboring branch of that same family tree. The story of how scientists pieced this together involves everything from fossilized ankle bones in Pakistan to shared patterns of inactivated skin genes, and it reshapes the intuition most people have about which animals are “related.”
The Molecular Evidence That Rewrote the Tree
For most of the twentieth century, biologists assumed whales descended from an extinct group of meat-eating mammals called mesonychians, which had hoof-like toes. Hippos were grouped loosely with pigs and peccaries under a suborder sometimes called Suiformes. DNA changed all of that. In the late 1990s, analyses of specific genetic markers known as short and long interspersed elements showed that cetaceans (whales, dolphins, and porpoises) are not just distantly related to artiodactyls but deeply nested within them. The same analyses showed that hippos and cetaceans form their own exclusive group, that pigs and peccaries form a separate exclusive group, and that camels diverged earliest among the broader order.1PubMed Central. Phylogenetic relationships among cetartiodactyls based on insertions of short and long interpersed elements: hippopotamuses are the closest extant relatives of whales
Independent work on the blood-clotting protein gene gamma-fibrinogen reached the same conclusion: hippos and whales are sister taxa, meaning they share a more recent common ancestor with each other than either does with any other living animal. That finding was described as “inconsistent with the paleontological perspective” at the time, because the fossil record had not yet revealed the transitional forms needed to connect a land-dwelling, hippo-like ancestor to early whales.2Molecular Biology and Evolution. More DNA support for a Cetacea/Hippopotamidae clade: the blood-clotting protein gene gamma-fibrinogen Today the combined group of hippos and cetaceans is informally called Whippomorpha, and the entire order is often referred to as Cetartiodactyla to acknowledge that whales belong inside it.
Where Pigs Actually Sit
Within this reshuffled tree, pigs (family Suidae) and peccaries (family Tayassuidae) occupy a branch called Suina. This branch split from the lineage leading to hippos and whales tens of millions of years ago. So pigs are related to whales, but in the way that cousins are related rather than siblings. Hippos are the whale’s sibling; pigs are more like the cousin at the other end of the table at a family reunion.
An important point that often gets garbled in popular retellings is this: pigs are not ancestors of whales or hippos, and hippos are not ancestors of whales. All of these animals share common ancestors that no longer exist. The pig lineage diverged from the hippo-whale lineage, and then hippos and whales diverged from each other. The common ancestor of all three groups was a small, probably omnivorous even-toed mammal that lived in the early Eocene, roughly 55 million years ago.
Pigs Versus Peccaries
If pigs and peccaries form their own branch, you might assume the two groups are nearly identical. They look broadly similar, with stocky bodies, flat snouts, and a fondness for rooting through soil. But the split between them is ancient, and the differences are telling. A detailed examination of skull and tooth anatomy found that the two families diverged in ways that trace back to their canine teeth. In pigs, the upper canine points outward, serving mainly as a visual signal in social competition. In peccaries, it points straight down and functions more as a weapon. This seemingly minor anatomical difference correlates with broader changes in jaw joint shape, chewing-muscle structure, and even social organization: pigs show much greater size differences between males and females, consistent with a mating system where males compete through display rather than direct combat.3Journal of Mammalogy. The Role of Canine Morphology in the Evolutionary Divergence of Pigs and Peccaries
Reproductive biology also diverged. Pigs are prolific breeders, with domestic sows routinely bearing litters of ten or more piglets, while peccaries usually have just two offspring per birth. Research on the enzyme aromatase, which is involved in sex-hormone metabolism, suggests that evolutionary changes in how pigs process estrogen may have been part of a suite of adaptations that allowed larger litter sizes as pigs diverged from peccaries.4PubMed Central. Adaptive evolution of mammalian aromatases: lessons from Suiformes Peccaries, found only in the Americas, went a different reproductive route and stuck with smaller litters and tighter-knit social herds.
The Fossils That Filled In the Gap
When DNA first placed whales inside Artiodactyla, paleontologists were understandably skeptical. Where were the transitional fossils? They turned up in rapid succession starting in the early 2000s, many from Eocene-age sediments in Pakistan and India.
One of the most important was Indohyus, a small, deer-like creature from about 48 million years ago. Analyses of its ear bones revealed a thickened bony casing called a pachyostotic bulla, a feature otherwise seen only in whales and their close relatives. Combined with tooth chemistry suggesting it spent time in water and had an herbivorous or omnivorous diet, Indohyus appears to be the closest known relative of cetaceans outside the whale lineage itself.5PLoS ONE. Relationships of Cetacea (Artiodactyla) Among Mammals: Increased Taxon Sampling Alters Interpretations of Key Fossils and Character Evolution Crucially, the same analysis placed the old suspect group, the mesonychians, outside Artiodactyla entirely, confirming the molecular verdict that whales evolved from artiodactyl ancestors, not from those meat-eating hoofed predators.
Even earlier transitional whales, the protocetids from about 47 million years ago, still had hind limbs capable of bearing weight on land. Their ankle bones had a distinctive double-pulley shape that is a hallmark of artiodactyls.6PLoS ONE. New Protocetid Whale from the Middle Eocene of Pakistan: Birth on Land, Precocial Development, and Sexual Dimorphism Finding artiodactyl-style ankles on an animal that was already recognizably whale-like in its skull and teeth was one of the most satisfying confirmations in vertebrate paleontology: the molecular tree and the fossil record finally agreed.
Entelodonts and Anthracotheres, the Extinct In-Laws
The evolutionary neighborhood around pigs, hippos, and whales once contained far more residents than it does today. Two extinct families, in particular, help clarify how the living groups are connected.
Entelodonts, sometimes called “hell pigs” or “terminator pigs” in popular media, were large, predatory or scavenging animals with massive skulls and bony lumps on their jaws. Despite the nickname, they were not pigs. Older classifications placed them close to the pig lineage in a group called Suiformes, but more recent phylogenetic work suggests entelodonts were actually closer to the hippo-whale side of the family tree, grouping with anthracotheres, hippos, and cetaceans rather than with pigs and peccaries.7Palaeogeography, Palaeoclimatology, Palaeoecology. Hogs, hippos or bears? Paleodiet of European Oligocene anthracotheres and entelodonts
Anthracotheres are the other key group. These were hippo-sized or smaller animals that roamed across Africa, Eurasia, and North America for tens of millions of years. They are widely regarded as the stock from which modern hippos eventually emerged. A study of ear anatomy found that the inner-ear structures of anthracotheres sit morphologically between those of typical terrestrial artiodactyls and those of modern hippos, suggesting a gradual transition toward a semiaquatic lifestyle.8Zoological Journal of the Linnean Society. Evolution of semiaquatic habits in hippos and their extinct relatives: insights from the ear region In other words, the ancestors of hippos did not plunge into rivers overnight. They waded in over geological time, and the fossil ear bones preserve that arc.
Hippos and Whales Went Aquatic on Their Own
One of the most common misconceptions about the hippo-whale relationship is the idea that because they are sisters, one led to the other’s aquatic habits, or that they entered the water together. The genomic evidence says otherwise. A comparative study identified eight skin-related genes that are inactivated in both cetaceans and hippos, genes involved in sebaceous glands, hair follicles, and the outer layer of skin. That sounds like a shared trait at first glance, but the mutations that knocked out those genes are different in the two lineages. None of the inactivating mutations are shared between hippos and whales.9PubMed Central. Genomic and anatomical comparisons of skin support independent adaptation to life in water by cetaceans and hippos
The timing reinforces this conclusion. By using the rate at which these genes accumulated disabling mutations, researchers estimated that cetaceans began losing hair, sebaceous glands, and other terrestrial skin features around 46.5 million years ago, while the equivalent changes in hippos started around 30.5 million years ago, roughly 16 million years later. So the two lineages share a common ancestor that lived on land, and each independently developed adaptations for spending time in water. Hippos waded in from one direction; whales dove in from another, much earlier. Pigs, meanwhile, stayed on dry ground and kept their bristly coats.
Suid Diversity Beyond the Farmyard
When people hear “pig,” they tend to picture the domestic pig, Sus scrofa domesticus, or maybe a wild boar. But the pig family Suidae is considerably more varied than that. There are bush pigs and red river hogs in Africa, warthogs across the African savanna, the giant forest hog (the largest living wild pig), and the bearded pigs of Southeast Asia. Perhaps the most unusual is the babirusa, found on the Indonesian island of Sulawesi and a few surrounding islands. Male babirusas have upper canine teeth that grow upward through the top of the snout and curve backward toward the forehead, a feature so strange that early European naturalists struggled to classify the animal.
The babirusa’s odd appearance led some early researchers to wonder whether it might be more closely related to hippos than to pigs. Anatomical comparisons of the placenta and heart, however, showed that babirusas share more structural features with other pigs than with hippos.10PubMed. The placenta and cardiac foramen ovale of the babirusa (Babyrousa babyrussa) The babirusa is a suid through and through, just an extremely distinctive one. Its unusual tusks are probably the product of sexual selection run wild in island isolation, not a sign of closer kinship to hippos.
The pig family also has a deep history as one of the earliest domesticated animal groups. Genetic mapping places pigs as a representative member of the artiodactyl clade, and their long history of domestication has made them one of the most genetically studied non-human mammals.11PubMed Central. Genetic resources, genome mapping and evolutionary genomics of the pig (Sus scrofa) That genomic wealth, ironically, has been instrumental in working out the evolutionary relationships of their more exotic relatives, since pig genomes serve as comparison points when researchers study whale or hippo DNA.
Why Immune Genes Track the Same Family Split
An unexpected line of evidence supporting the pig-hippo-whale family tree comes from the immune system. Toll-like receptors are proteins that detect invading pathogens, essentially molecular sentinels. When researchers compared the evolution of these receptors across terrestrial ungulates and cetaceans, they found strong signals of positive selection, meaning the genes had been repeatedly reshaped by evolutionary pressure from new diseases. What was particularly striking was that one receptor called TLR3, which senses viral genetic material, showed a significant divergence in how it evolved in terrestrial ungulates compared to cetaceans.12PubMed Central. Evolution of toll-like receptors in the context of terrestrial ungulates and cetaceans diversification
This makes sense when you consider the habitats involved. Terrestrial ungulates like pigs encounter a different cocktail of soil-borne bacteria, parasites, and viruses than a whale swimming through the open ocean. Over millions of years, the immune sensors of each group were sculpted by the pathogens they actually faced. The pattern of divergence in these immune genes aligns with the same phylogenetic split seen in the broader DNA evidence: pigs and other land-dwelling artiodactyls on one side, cetaceans on the other, with hippos occupying a bridging position between the two worlds.
Smell as a Casualty of Going Aquatic
Another way to trace the divergence of pigs from their aquatic cousins is through the sense of smell. Pigs are famous for their keen noses, able to detect truffles buried underground or identify individual herd members by scent. Whales, by contrast, have essentially abandoned smell. A broad comparison of olfactory receptor genes across 23 mammal species found that all marine mammals had fewer of these genes than their terrestrial relatives, with cetaceans possessing the fewest of all.13PubMed Central. Convergent degeneration of olfactory receptor gene repertoires in marine mammals When you spend your life underwater and breathe through a blowhole that only opens briefly at the surface, maintaining a complex sense of smell provides little survival benefit. The genes are still there in whale genomes, but many have accumulated so many disabling mutations that they no longer produce functional proteins.
Pigs went the other direction. Their reliance on rooting through soil and forest litter for food placed a premium on olfactory acuity, so their smell-receptor gene repertoire stayed large and functional. This contrast is a vivid illustration of how closely related lineages can end up with radically different sensory equipment depending on the environment they adapt to. The genetic toolkit was similar at the starting line; 50 million years of different selective pressures reshaped it beyond recognition.
Convergence and Confusion With Unrelated Animals
The pig-hippo-whale family tree also helps illustrate a broader lesson about convergent evolution, where unrelated animals evolve similar body plans because they face similar ecological challenges. South America, for instance, was home for millions of years to its own set of native ungulates that filled niches similar to those occupied by artiodactyls and perissodactyls on other continents. Some of these South American native ungulates reached several tons in body mass and evolved diet and locomotion combinations not seen in any living hoofed mammal.14Annual Review of Earth and Planetary Sciences. Splendid Innovation: The Extinct South American Native Ungulates Despite superficial resemblances to pigs or hippos, these animals were not artiodactyls at all. Recent molecular work on collagen preserved in fossils has shown that some of them were more closely related to horses, or even to elephants.
The same kind of confusion applies to the entelodonts mentioned earlier. Their pig-like snouts and robust builds earned them the “hell pig” label, but their actual position on the tree is closer to hippos and whales. Appearances in evolutionary biology are routinely misleading. A hippo looks like it should be related to a pig or a rhino. A whale looks like it belongs with fish. The molecular and fossil evidence tells a completely different story, one where a small, unassuming even-toed ancestor gave rise to the largest animals ever to live in the ocean, the mud-wallowing giants of African rivers, and the bristly, truffle-hunting rooters of European forests alike.